8000 pilot: use per revision leader for namespace controller by zirain · Pull Request #56595 · istio/istio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pilot: use per revision leader for namespace controller #56595

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zirain
Copy link
Member
@zirain zirain commented Jun 12, 2025

Please provide a description of this PR:

Fixes: #56594

This should be per revision, otherwise multi reversions with discoverySelector won't work as #56594 mentioned.

@zirain zirain requested a review from a team as a code owner June 12, 2025 11:55
@istio-policy-bot
Copy link

🤔 🐛 You appear to be fixing a bug in Go code, yet your PR doesn't include updates to any test files. Did you forget to add a test?

Courtesy of your friendly test nag.

@istio-testing istio-testing added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 12, 2025
@zirain zirain requested a review from a team as a code owner June 12, 2025 12:34
@howardjohn
Copy link
Member

this doesn't seem to make sense. In 99% of the cases they are going to be writing the same configmap to the same namespace which kind of defeats the purpose of the leader election entirely no?

Would almost be better off not having leader election at all..

@zirain
Copy link
Member Author
zirain commented Jun 12, 2025

this doesn't seem to make sense. In 99% of the cases they are going to be writing the same configmap to the same namespace which kind of defeats the purpose of the leader election entirely no?

Would almost be better off not having leader election at all..

it's an edge case from real world, what about enable it when discovery selector is not nil?

Signed-off-by: zirain <zirain2009@gmail.com>
@zirain zirain force-pushed the istio-namespace-controller-election branch from b11b735 to 3a8ddfe Compare June 13, 2025 03:12
@istio-testing istio-testing added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 13, 2025
@zirain
Copy link
Member Author
zirain commented Jun 18, 2025

Would almost be better off not having leader election at all..

TBH, I'm not sure if this will introduce more problems.

Copy link
Contributor
@dgn dgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're using discoverySelectors and performing a canary upgrade, there will now be a situation where two different revisions with the same discoverySelectors exist, and they have separate leader elections ie leader election does not do anything.

I agree that we might just want to drop leader election from the NamespaceController. Even with this, you will always be able to construct a combination of revision name and discoverySelector that overlaps, causing problems.

Update: actually, thinking about it, this patch is probably less problematic than the status quo and avoids a big change like dropping leader election, so I'm fine with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

istio-ca-root-cert CM not created in revisioned CPs with different DiscoverySelectors
5 participants
0