Skip to content

Commit

Permalink
OCPBUGS-39151: Add Missing Scope Change Instructions
Browse files Browse the repository at this point in the history
The instructions for effectuating a scope change were missing because
the `loadBalancerServiceIsProgressing` did not account for the PowerVS,
Alibaba, and OpenStack platform types. This update add those instructions
for these platforms when they change an IngressController's scope.
  • Loading branch information
gcs278 committed Sep 3, 2024
1 parent 26f0181 commit a6b6bb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/operator/controller/ingress/load_balancer_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,7 @@ func loadBalancerServiceIsProgressing(ic *operatorv1.IngressController, service
}
if wantScope != haveScope {
err := fmt.Errorf("The IngressController scope was changed from %q to %q.", haveScope, wantScope)
switch platform.Type {
case configv1.AWSPlatformType, configv1.IBMCloudPlatformType:
if _, ok := platformsWithMutableScope[platform.Type]; !ok {
err = fmt.Errorf("%[1]s To effectuate this change, you must delete the service: `oc -n %[2]s delete svc/%[3]s`; the service load-balancer will then be deprovisioned and a new one created. This will most likely cause the new load-balancer to have a different host name and IP address from the old one's. Alternatively, you can revert the change to the IngressController: `oc -n openshift-ingress-operator patch ingresscontrollers/%[4]s --type=merge --patch='{\"spec\":{\"endpointPublishingStrategy\":{\"loadBalancer\":{\"scope\":\"%[5]s\"}}}}'`", err.Error(), service.Namespace, service.Name, ic.Name, haveScope)
}
errs = append(errs, err)
Expand Down

0 comments on commit a6b6bb2

Please sign in to comment.