-
Notifications
You must be signed in to change notification settings - Fork 220
Support changing ingresscontroller load balancer scope #394
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
Conversation
Add support for changing ingresscontroller load balancer scope. Handle this by deleting the existing load balancer service and re-creating the service using the desired scope.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ironcladlou 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 |
| echo "Release version: ${RELEASE_VERSION}" | ||
|
|
||
| IMAGE="${IMAGE}" RELEASE_VERSION="${RELEASE_VERSION}" ${DELVE:-} ./ingress-operator start $@ | ||
| IMAGE="${IMAGE}" RELEASE_VERSION="${RELEASE_VERSION}" ${DELVE:-} ./ingress-operator start --image $IMAGE --release-version $RELEASE_VERSION --namespace openshift-ingress-operator --shutdown-file "" $@ |
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.
Quote $@ as "$@".
| } | ||
| // Detect changes to LB scope, which is something we can safely roll out. | ||
| specLB := ic.Status.EndpointPublishingStrategy.LoadBalancer | ||
| statusLB := effectiveStrategy.LoadBalancer |
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.
I believe you want to swap specLB and statusLB var names.
| func TestScopeChange(t *testing.T) { | ||
| platform := infraConfig.Status.Platform | ||
|
|
||
| supportedPlatforms := map[configv1.PlatformType]struct{}{ |
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.
@ironcladlou is there a reason why GCP is not included?
|
@Miciah other than a few nits, LGTM. I think the nits can be addressed as a follow-up, but I'll let you tag. |
|
Hi! What's the status of this? Is it blocked, or can it be merged? |
| case desired != nil && current != nil: | ||
| // If switching from internal/external, delete and recreate the service. | ||
| if IsServiceInternal(desired) != IsServiceInternal(current) { | ||
| if _, err := r.finalizeLoadBalancerService(ci); err != 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.
The cloud provider implementations for Azure and GCE apparently can handle changing between internal and external internally:
https://github.com/kubernetes/kubernetes/blob/0a14265b7e4c9d207ec4ebd1be687e029e7180d4/staging/src/k8s.io/legacy-cloud-providers/azure/azure_loadbalancer.go#L161-L197
https://github.com/kubernetes/kubernetes/blob/678d3f2841e8bc03582825a36e47a530d1fa16a4/staging/src/k8s.io/legacy-cloud-providers/gce/gce_loadbalancer.go#L129-L153
The cloud provider implementation for AWS cannot:
So it seems like we could skip this logic for Azure and GCE and instead just update the annotation on the service.
|
@ironcladlou: The following test failed, say
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. |
|
/close |
|
@Miciah: Closed this PR. 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. |
Add support for changing ingresscontroller load balancer scope. Handle this by
deleting the existing load balancer service and re-creating the service using
the desired scope.
/cc @openshift/sig-network-edge @mwoodson