Repository navigation
[release-v1.42] Grant kube-controllers patch permission on tiers - #5360
Merged
caseydavenport merged 1 commit intoOct 20, 2026
Merged
Conversation
The tier controller patches tiers to add and remove its finalizer. (cherry picked from commit 0d39ca3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bug fix, cherry-picked cleanly from PR 4972 (kube-controllers tier patch RBAC), which is already on master and release-v1.44.
Calico v3.32.2 shipped PR 13446 (tier finalizer patch backport), a backport of PR 13082 (tier finalizer via patch), so kube-controllers now adds its tier finalizer with a patch. Operator release-v1.42 pairs with Calico v3.32 and only grants create, update, get, list, and watch on tiers. On clusters using native projectcalico.org/v3 CRDs, kube-apiserver enforces that RBAC directly and rejects every patch:
Tiers never get the finalizer, so kube-controllers doesn't hold a tier's deletion until its policies are gone, and it logs that error continuously. We saw it on the nftables-talos native v3 CRD e2e lanes. Installs using the aggregated API server aren't affected.
This adds "patch" to the kube-controllers ClusterRole rule for tiers in both the projectcalico.org and crd.projectcalico.org groups, plus a render test asserting the rule. Only release-v1.42 needs the backport, since Calico v3.33 pairs with release-v1.44.
Tested with
make ut UT_DIR=./pkg/render/kubecontrollers(43 of 43 specs pass).AI assistance: Claude Code did the port and ran the tests. I reviewed it and am responsible for it.
Release Note
Related: CORE-13874
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.