@@ -262,7 +262,7 @@ type Config struct {
262
262
// IstioSidecarProxyDefaultMemory is the default Memory resource request of the istio sidecar proxy (default: 200Mi)
263
263
IstioSidecarProxyDefaultMemory string `yaml:"IstioSidecarProxyDefaultMemory"`
264
264
265
- // serviceGroups defines a list of service category names.
265
+ // ServiceGroups defines a list of service category names.
266
266
ServiceGroups []ServiceGroup `yaml:"ServiceGroups"`
267
267
// MaximumMaxReplicasPerService is the maximum maxReplicas that tortoise can give to the HPA per service category.
268
268
// 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 {
275
275
276
276
type MaximumMaxReplicasPerGroup struct {
277
277
// ServiceGroupName refers to one ServiceGroup at Config.ServiceGroups
278
- ServiceGroupName * string `yaml:"ServiceGroupName"`
278
+ ServiceGroupName string `yaml:"ServiceGroupName"`
279
279
280
280
MaximumMaxReplica int32 `yaml:"MaximumMaxReplica"`
281
281
}
@@ -390,9 +390,9 @@ func validate(config *Config) error {
390
390
}
391
391
392
392
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 )
396
396
}
397
397
}
398
398
}
@@ -408,7 +408,7 @@ func validate(config *Config) error {
408
408
409
409
// Check all entries in MaximumMaxReplicasPerService have non-nil ServiceGroupName
410
410
for _ , maxReplicas := range config .MaximumMaxReplicasPerService {
411
- if maxReplicas .ServiceGroupName == nil {
411
+ if maxReplicas .ServiceGroupName == "" {
412
412
return fmt .Errorf ("ServiceGroupName should not be nil in MaximumMaxReplicasPerService entries" )
413
413
}
414
414
}
0 commit comments