[occm] Skip LB rename for shared load balancers from other clusters#3079
[occm] Skip LB rename for shared load balancers from other clusters#3079234u34k wants to merge 3 commits into
Conversation
|
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @234u34k. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
When a Service references a shared load balancer via annotation, the OCCM rename logic (added in kubernetes#2552) sees a different cluster name in the LB name and renames it. This breaks multi-cluster shared LB setups because the owning cluster loses its LB name and tags. Before renaming, verify that the LB's namespace and service name components match the current Service. This distinguishes a legitimate cluster-name change (same service, new cluster name) from a cross-cluster shared LB access (different service entirely).
f89465f to
d223a02
Compare
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
|
Hi @234u34k, thanks for this PR even if i have no permission to review this, the direction makes sense to me. one thing i want to double-check, the original #2682 example seems to use same namespace and service name across clusters. for example, cluster-B reconciling a shared LB named If so,, should the rename path also takes the explicit shared LB into account. for example when may be im missing part of the ownership logic here, but think a regression test can cover the #2682 examples. |
|
/remove-lifecycle rotten |
The name-based guard cannot distinguish a shared load balancer created by another cluster's Service with the same namespace and name from this cluster's own load balancer after a cluster-name change. Introduce an enable-lb-rename option (default true, keeping kubernetes#2552 behavior) so deployments sharing load balancers across clusters can disable renaming altogether. Extract the ownership check into lbNameMatchesService, log at V(4) when a rename is skipped, document the new option, and add regression tests covering the kubernetes#2682 scenarios.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Confirmed. Gating on the Updated the PR accordingly:
Also added a V(4) log when a rename is skipped and a docs entry for the option. @kayrus @stephenfin could one of you take a look and issue /ok-to-test? CI has |
|
/ok-to-test |
jihyun-huh
left a comment
There was a problem hiding this comment.
Thanks for updating this!
Ive read the new changes and they look good to me.
one small thing I'd consider, is adding a test covering enable-lb-rename=false ,
so the new configuration path is explicitly covered.
I also tested the scenarios locally, including enable-lb-rename=false, and it worked well as expected.
|
@stephenfin could I ask for a review from you on this at your convenience? Believe it's ready now |
890c747 to
8fe627a
Compare
The cluster-name rename logic from #2552 does not account for shared load balancers. When cluster B references a shared LB created by cluster A, the OCCM sees a mismatched cluster name and renames the LB, breaking cluster A.
Before renaming, verify that the LB's namespace and service name components match the current Service. This distinguishes a legitimate cluster-name change from a cross-cluster shared LB access.
Ref #2682