Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/operator/controller/ingress/load_balancer_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth dropping a comment here explaining that we used to set the annotation to 0.0.0.0/0 in prior OCP versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I've updated the PR with an explanation comment.

awsInternalLBAnnotation: "true",
},
configv1.AzurePlatformType: {
// Azure load balancers are not customizable and are set to (2 fail @ 5s interval, 2 healthy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down