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
[release-4.6] Bug 1891626: Support changing ingresscontroller load balancer scope #482
[release-4.6] Bug 1891626: Support changing ingresscontroller load balancer scope #482
Conversation
Add support for changing ingresscontroller load balancer scope. On AWS and IBM cloud, this requires deleting the existing load balancer service and recreating it with the desired scope. On Azure and GCP, it suffices to update the existing service's annotations. This commit also adds logic to remove the service finalizer, which is no longer needed to clean up DNS records since the DNSRecord CRD was added. * pkg/operator/controller/ingress/controller.go (setDefaultPublishingStrategy): Update scope if needed. * pkg/operator/controller/ingress/load_balancer_service.go (externalLBAnnotations): New variable. Map platform type to the annotation for that platform that makes the load balancer external, if the platform requires an explicit annotation. (ensureLoadBalancerService): Add delete and update logic. Use the new deleteLoadBalancerServiceFinalizer method to delete any finalizer on any existing service. Use the new createLoadBalancerService, deleteLoadBalancerService, and updateLoadBalancerService methods to create, update, or delete the service as needed. (desiredLoadBalancerService): Delete logic to add a finalizer to the service. Use new externalLBAnnotations variable to simplify logic. (finalizeLoadBalancerService): Refactor to use the new deleteLoadBalancerServiceFinalizer method. (createLoadBalancerService, deleteLoadBalancerService): New methods. (updateLoadBalancerService): New methods. Update the LoadBalancer service, using the new loadBalancerServiceChanged function. (loadBalancerServiceScopeChanged): New function. Check if the load balancer's scope changed. (loadBalancerServiceChanged): New function. Check if the current service needs to be updated, and if so, whether it needs to be modified or deleted and recreated. (deleteLoadBalancerServiceFinalizer): New method. Delete any finalizer from the service. * pkg/operator/controller/ingress/load_balancer_service_test.go (TestLoadBalancerServiceChanged): New test. (TestLoadBalancerServiceChangedScopeNeedsRecreate): New test. * test/e2e/operator_test.go (isServiceInternal): New function. Return a Boolean value indicating whether the provided service is annotated to request an internal load-balancer. (TestScopeChange): New test. Verify that mutating scope from the default external scope to internal scope and from internal back to external succeeds on AWS, Azure, GCP, and IBM Cloud. Co-authored-by: Dan Mace <ironcladlou@gmail.com>
@openshift-cherrypick-robot: Bugzilla bug 1891625 has been cloned as Bugzilla bug 1892447. Retitling PR to link against new bug. In 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. |
@openshift-cherrypick-robot: This pull request references Bugzilla bug 1892447, which is invalid:
Comment In 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. |
/retitle [release-4.6] Bug 1891626: Support changing ingresscontroller load balancer scope |
@openshift-cherrypick-robot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 1891626, which is invalid:
Comment In 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 1891626, which is invalid:
Comment In 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. |
/retest |
/lgtm |
/bugzilla refresh Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 Recalculating validity in case the underlying Bugzilla bug has changed. |
@openshift-bot: This pull request references Bugzilla bug 1891626, which is invalid:
Comment In 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 |
@lihongan: This pull request references Bugzilla bug 1891626, which is valid. 6 validation(s) were run on this bug
In 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 cc-qa |
@lihongan: This pull request references Bugzilla bug 1891626, which is valid. 6 validation(s) were run on this bug
Requesting review from QA contact: In 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. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lihongan, openshift-cherrypick-robot, sgreene570 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
@openshift-cherrypick-robot: All pull requests linked via external trackers have merged: Bugzilla bug 1891626 has been moved to the MODIFIED state. In 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. |
This broke clusters that were created in 4.1 - we will be blocking upgrade to 4.6.6 with openshift/cincinnati-graph-data#577 and tracking it in https://bugzilla.redhat.com/show_bug.cgi?id=1904582 |
This is an automated cherry-pick of #472
/assign Miciah