-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix nginx controller leader election failed on certain setup #10282
Conversation
Under the original code, leader election failed for ingress controllers as a result of mismatch between election-id in the controller config, and the resourceName in the relevant rule of role 'ingress-nginx'. This appeared in the contoller logs. To fix the issue, a command-line option was added to container execution (--election-id=...). Now, the electio-id agrees with the resourceName provided in the role-ingress-nginx.yml file. A comment in that file was changed to reflect the new logic.
Welcome @vsamtuc! |
Hi @vsamtuc. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Adding more detail to original comment: Under the original code, leader election failed for ingress controllers as a result of mismatch between election-id in the controller config, and the resourceName in the relevant rule of role 'ingress-nginx'. This appeared in the contoller logs. To fix the issue, a command-line option was added to container execution (--election-id=...). Now, the election-id agrees with the resourceName provided in the role-ingress-nginx.yml file. A comment in that file was changed to reflect the new logic. What type of PR is this? /kind bug What this PR does / why we need it: Without it the ingress-nginx controller did not deploy correctly. Which issue(s) this PR fixes: Fixes # 10276 Special notes for your reviewer: Sorry for a confusing submission, this is my first PR in kubespray :-) Does this PR introduce a user-facing change?: No |
/ok-to-test |
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2
Outdated
Show resolved
Hide resolved
The PR title and commit message can be changed to "Fix nginx controller leader election failed on certain setup" |
Hello @vsamtuc Please look at the below comment. I've reviewed and looks fine to me. Thank you!
|
@vsamtuc Would you please check this and maybe rebase so we can merge this. |
Is there any update on this PR? :) I updated my ClusterRole until merge.. adjusted it like this: |
Please merge this. 🙏 I used the latest version v2.23.0 and stumpled upon this. 💥 Patched manually the fix from this PR and fixed it. ✅ |
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.
/lgtm
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2
Outdated
Show resolved
Hide resolved
roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/role-ingress-nginx.yml.j2
Outdated
Show resolved
Hide resolved
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mzaian, vsamtuc 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 |
…es/role-ingress-nginx.yml.j2
New changes are detected. LGTM label has been removed. |
We will consider it in v2.23.1 see here: #10569 |
I think you should rebase, the CI failures might because master has changed stuff. |
@vsamtuc ^ |
@mzaian do you have the write perms on this PR ? I think if we rebase it on master it should work |
I cannot remember but I did a cherry-pick and referenced to this PR here https://github.com/kubernetes-sigs/kubespray/pull/10569/files We could do the same since that no response. |
Or I can force merge it if need be |
We need to rebase to not break other changes. I would suggest a cherry-pick PR with the same stuff since that he is not available. |
Doesn't Github allow repo maintainers to push on PR branch ? So we could the rebase ourselves. |
This has to be allowed by the PR owner while he is creating the PR. To allow maintainers to edit the PR. |
/close |
@VannTen: Closed this PR. 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. |
Under the original code, leader election failed for ingress controllers as a result of mismatch between election-id in the controller config, and the resourceName in the relevant rule of role 'ingress-nginx'. This appeared in the contoller logs.
To fix the issue, a command-line option was added to container execution (--election-id=...).
Now, the electio-id agrees with the resourceName provided in the role-ingress-nginx.yml file. A comment in that file was changed to reflect the new logic.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #10276
Special notes for your reviewer:
Does this PR introduce a user-facing change?: