@@ -262,7 +262,7 @@ type Config struct {
262262 // IstioSidecarProxyDefaultMemory is the default Memory resource request of the istio sidecar proxy (default: 200Mi)
263263 IstioSidecarProxyDefaultMemory string `yaml:"IstioSidecarProxyDefaultMemory"`
264264
265- // serviceGroups defines a list of service category names.
265+ // ServiceGroups defines a list of service category names.
266266 ServiceGroups []ServiceGroup `yaml:"ServiceGroups"`
267267 // MaximumMaxReplicasPerService is the maximum maxReplicas that tortoise can give to the HPA per service category.
268268 // If the service category is not found in this list, tortoise uses the default value which is the value set in MaximumMaxReplicas.
@@ -275,7 +275,7 @@ type Config struct {
275275
276276type MaximumMaxReplicasPerGroup struct {
277277 // ServiceGroupName refers to one ServiceGroup at Config.ServiceGroups
278- ServiceGroupName * string `yaml:"ServiceGroupName"`
278+ ServiceGroupName string `yaml:"ServiceGroupName"`
279279
280280 MaximumMaxReplica int32 `yaml:"MaximumMaxReplica"`
281281}
@@ -390,9 +390,9 @@ func validate(config *Config) error {
390390 }
391391
392392 for _ , maxReplicas := range config .MaximumMaxReplicasPerService {
393- if maxReplicas .ServiceGroupName != nil {
394- if _ , exists := serviceGroupMap [* maxReplicas .ServiceGroupName ]; ! exists {
395- return fmt .Errorf ("ServiceGroupName %s in MaximumMaxReplicas is not defined in ServiceGroups" , * maxReplicas .ServiceGroupName )
393+ if maxReplicas .ServiceGroupName != "" {
394+ if _ , exists := serviceGroupMap [maxReplicas .ServiceGroupName ]; ! exists {
395+ return fmt .Errorf ("ServiceGroupName %s in MaximumMaxReplicas is not defined in ServiceGroups" , maxReplicas .ServiceGroupName )
396396 }
397397 }
398398 }
@@ -408,7 +408,7 @@ func validate(config *Config) error {
408408
409409 // Check all entries in MaximumMaxReplicasPerService have non-nil ServiceGroupName
410410 for _ , maxReplicas := range config .MaximumMaxReplicasPerService {
411- if maxReplicas .ServiceGroupName == nil {
411+ if maxReplicas .ServiceGroupName == "" {
412412 return fmt .Errorf ("ServiceGroupName should not be nil in MaximumMaxReplicasPerService entries" )
413413 }
414414 }
0 commit comments