@@ -453,7 +453,7 @@ func parseRateLimitAnnotations(annotations map[string]string, cfgParams *ConfigP
453
453
errors := make ([]error , 0 )
454
454
if requestRateLimit , exists := annotations ["nginx.org/limit-req-rate" ]; exists {
455
455
if rate , err := ParseRequestRate (requestRateLimit ); err != nil {
456
- errors = append (errors , fmt .Errorf ("Ingress %s/%s: Invalid value for nginx.org/limit-req-rate: got %s: %w" , context .GetNamespace (), context .GetName (), requestRateLimit , err ))
456
+ errors = append (errors , fmt .Errorf ("ingress %s/%s: invalid value for nginx.org/limit-req-rate: got %s: %w" , context .GetNamespace (), context .GetName (), requestRateLimit , err ))
457
457
} else {
458
458
cfgParams .LimitReqRate = rate
459
459
}
@@ -463,7 +463,7 @@ func parseRateLimitAnnotations(annotations map[string]string, cfgParams *ConfigP
463
463
}
464
464
if requestRateZoneSize , exists := annotations ["nginx.org/limit-req-zone-size" ]; exists {
465
465
if size , err := ParseSize (requestRateZoneSize ); err != nil {
466
- errors = append (errors , fmt .Errorf ("Ingress %s/%s: Invalid value for nginx.org/limit-req-zone-size: got %s: %w" , context .GetNamespace (), context .GetName (), requestRateZoneSize , err ))
466
+ errors = append (errors , fmt .Errorf ("ingress %s/%s: invalid value for nginx.org/limit-req-zone-size: got %s: %w" , context .GetNamespace (), context .GetName (), requestRateZoneSize , err ))
467
467
} else {
468
468
cfgParams .LimitReqZoneSize = size
469
469
}
@@ -498,7 +498,7 @@ func parseRateLimitAnnotations(annotations map[string]string, cfgParams *ConfigP
498
498
}
499
499
if requestRateLogLevel , exists := annotations ["nginx.org/limit-req-log-level" ]; exists {
500
500
if ! slices .Contains ([]string {"info" , "notice" , "warn" , "error" }, requestRateLogLevel ) {
501
- errors = append (errors , fmt .Errorf ("Ingress %s/%s: Invalid value for nginx.org/limit-req-log-level: got %s" , context .GetNamespace (), context .GetName (), requestRateLogLevel ))
501
+ errors = append (errors , fmt .Errorf ("ingress %s/%s: invalid value for nginx.org/limit-req-log-level: got %s" , context .GetNamespace (), context .GetName (), requestRateLogLevel ))
502
502
} else {
503
503
cfgParams .LimitReqLogLevel = requestRateLogLevel
504
504
}
0 commit comments