diff --git a/pkg/operator/controller/ingress/load_balancer_service.go b/pkg/operator/controller/ingress/load_balancer_service.go index bfe95a24af..19aaf5c7e8 100644 --- a/pkg/operator/controller/ingress/load_balancer_service.go +++ b/pkg/operator/controller/ingress/load_balancer_service.go @@ -97,8 +97,12 @@ var ( // // https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer InternalLBAnnotations = map[configv1.PlatformType]map[string]string{ + // Prior to 4.8, the aws internal LB annotation was set to "0.0.0.0/0". + // While "0.0.0.0/0" is valid, the preferred value, according to the + // documentation[1], is "true". + // [1] https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer configv1.AWSPlatformType: { - awsInternalLBAnnotation: "0.0.0.0/0", + awsInternalLBAnnotation: "true", }, configv1.AzurePlatformType: { // Azure load balancers are not customizable and are set to (2 fail @ 5s interval, 2 healthy) diff --git a/pkg/operator/controller/ingress/load_balancer_service_test.go b/pkg/operator/controller/ingress/load_balancer_service_test.go index f13d16162e..d2f2ef9bcb 100644 --- a/pkg/operator/controller/ingress/load_balancer_service_test.go +++ b/pkg/operator/controller/ingress/load_balancer_service_test.go @@ -218,7 +218,7 @@ func TestDesiredLoadBalancerService(t *testing.T) { switch platform.Type { case configv1.AWSPlatformType: if isInternal { - if err := checkServiceHasAnnotation(svc, awsInternalLBAnnotation, true, "0.0.0.0/0"); err != nil { + if err := checkServiceHasAnnotation(svc, awsInternalLBAnnotation, true, "true"); err != nil { t.Errorf("annotation check for test %q failed: %v", tc.description, err) } }