-
Notifications
You must be signed in to change notification settings - Fork 220
Bug 2055470: Normalize the AWS internal LB annotation value #704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 2055470: Normalize the AWS internal LB annotation value #704
Conversation
The AWS cloud-provider implementation checks the service.beta.kubernetes.io/aws-load-balancer-internal service annotation to determine whether a service load-balancer (SLB) should be internal. The cloud-provider implementation recognizes both the value "0.0.0.0/0" and the value "true" as indicating that the SLB should be internal. OpenShift 4.7 and earlier use the value "0.0.0.0/0", and OpenShift 4.8 and later use the value "true". A service that was created on an older cluster might have the value "0.0.0.0/0", which can cause comparisons that check for the "true" value to return the wrong result. This commit adds logic to normalize the annotation value to "true". Follow-up to commit 3abcba5 and commit 4cc59f5. This commit fixes bug 2055470. https://bugzilla.redhat.com/show_bug.cgi?id=2055470 * pkg/operator/controller/ingress/load_balancer_service.go (ensureLoadBalancerService): Call the new normalizeLoadBalancerServiceAnnotations method to normalize the AWS internal LB annotation. (normalizeLoadBalancerServiceAnnotations): New method. Normalize the service.beta.kubernetes.io/aws-load-balancer-internal service annotation by replacing the value "0.0.0.0/0" with the value "true". * test/e2e/operator_test.go (TestInternalLoadBalancer): Verify that the operator updates the old "0.0.0.0/0" annotation value to "true".
|
@Miciah: This pull request references Bugzilla bug 2055470, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/bugzilla refresh |
|
@Miciah: This pull request references Bugzilla bug 2055470, which is invalid:
Comment DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/bugzilla refresh |
|
@Miciah: This pull request references Bugzilla bug 2055470, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Unfortunately the operator logs start a few minutes after the Let's make sure the test change didn't break other platforms. /test e2e-azure-operator |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, miheer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| log.Info("normalized annotation", "namespace", service.Namespace, "name", service.Name, "annotation", awsInternalLBAnnotation, "old", v, "new", updated.Annotations[awsInternalLBAnnotation]) | ||
|
|
||
| return true, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we shall say return true, err ? anyway the logic will remain same.
|
/retest |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
@Miciah: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@Miciah: All pull requests linked via external trackers have merged: Bugzilla bug 2055470 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cherry-pick release-4.10 |
|
@Miciah: new pull request created: #705 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The AWS cloud-provider implementation checks the
service.beta.kubernetes.io/aws-load-balancer-internalservice annotation to determine whether a service load-balancer (SLB) should be internal. The cloud-provider implementation recognizes both the value "0.0.0.0/0" and the value "true" as indicating that the SLB should be internal. OpenShift 4.7 and earlier use the value "0.0.0.0/0", and OpenShift 4.8 and later use the value "true". A service that was created on an older cluster might have the value "0.0.0.0/0", which can cause comparisons that check for the "true" value to return the wrong result. This PR adds logic to normalize the annotation value to "true".Follow-up to #543 and to #582.
pkg/operator/controller/ingress/load_balancer_service.go(ensureLoadBalancerService): Call the newnormalizeLoadBalancerServiceAnnotationsmethod to normalize the AWS internal LB annotation.(
normalizeLoadBalancerServiceAnnotations): New method. Normalize theservice.beta.kubernetes.io/aws-load-balancer-internalservice annotation by replacing the value "0.0.0.0/0" with the value "true".test/e2e/operator_test.go(TestInternalLoadBalancer): Verify that the operator updates the old "0.0.0.0/0" annotation value to "true".