-
Notifications
You must be signed in to change notification settings - Fork 589
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(rbac): fix leader election policy rules #3932
Conversation
186f931
to
b4ebed5
Compare
E2E (targeted) tests were started at https://github.com/Kong/kubernetes-ingress-controller/actions/runs/4796180818 |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3932 +/- ##
=======================================
- Coverage 58.3% 58.3% -0.1%
=======================================
Files 141 141
Lines 16191 16191
=======================================
- Hits 9441 9440 -1
Misses 6107 6107
- Partials 643 644 +1 see 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
E2E run passed: unreleased kong tests passed with 2 exceptions: for 1 setup-golang hang 🤷 and for another it failed for unknown reason. Since it's nightly of Kong Gateway I'm moving forward with this PR. |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.9.x release/2.9.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.9.x
# Create a new branch
git switch --create backport-3932-to-release/2.9.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a4f480ed373c8be8f2c0e68b079e19dd8649dbae
# Push it to GitHub
git push --set-upstream origin backport-3932-to-release/2.9.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.9.x Then, create a pull request where the |
What this PR does / why we need it:
This PR addresses an issue which doesn't manifest itself when the leader election role is used straight from the manifest file it is defined in but it does when e.g. the role is unmarshalled in code where api groups and resources from those its policy rules might get mixed up.
That for instance, caused problems where the gateway operator generates control plane (cluster) roles and parses the role manifests.
The net result of this PR should be a noop for KIC users but it should fix the above mentioned issue for those that unmarshal the manifests or use them otherwise in code.
Which issue this PR fixes:
Related: https://github.com/Kong/gateway-operator/issues/727
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR