Skip to content

Commit

Permalink
change of service to pass test
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioLangaritaBenitez committed Jan 9, 2025
1 parent df17fce commit e251d52
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pkg/types/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,7 @@ type Service struct {
// Optional
ImagePullSecrets []string `json:"image_pull_secrets,omitempty"`

Expose struct {
MinScale int32 `json:"min_scale" default:"1"`
MaxScale int32 `json:"max_scale" default:"10"`
APIPort int `json:"api_port,omitempty" `
CpuThreshold int32 `json:"cpu_threshold" default:"80" `
RewriteTarget bool `json:"rewrite_target" default:"false" `
NodePort int32 `json:"nodePort" default:"0" `
DefaultCommand bool `json:"default_command" `
SetAuth bool `json:"set_auth" `
} `json:"expose"`
Expose Expose `json:"expose"`

// The user-defined environment variables assigned to the service
// Optional
Expand Down Expand Up @@ -273,6 +264,17 @@ type Service struct {
Mount StorageIOConfig `json:"mount"`
}

type Expose struct {
MinScale int32 `json:"min_scale" default:"1"`
MaxScale int32 `json:"max_scale" default:"10"`
APIPort int `json:"api_port,omitempty" `
CpuThreshold int32 `json:"cpu_threshold" default:"80" `
RewriteTarget bool `json:"rewrite_target" default:"false" `
NodePort int32 `json:"nodePort" default:"0" `
DefaultCommand bool `json:"default_command" `
SetAuth bool `json:"set_auth" `
}

// ToPodSpec returns a k8s podSpec from the Service
func (service *Service) ToPodSpec(cfg *Config) (*v1.PodSpec, error) {
resources, err := createResources(service)
Expand Down

0 comments on commit e251d52

Please sign in to comment.