diff --git a/pkg/types/service.go b/pkg/types/service.go index 78c3c434..81807f9d 100644 --- a/pkg/types/service.go +++ b/pkg/types/service.go @@ -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 @@ -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)