fix: add RBAC clusters/finalizers permission and fix Makefile paths#66
Open
ermakov-oleg wants to merge 1 commit intooperasoftware:mainfrom
Open
fix: add RBAC clusters/finalizers permission and fix Makefile paths#66ermakov-oleg wants to merge 1 commit intooperasoftware:mainfrom
ermakov-oleg wants to merge 1 commit intooperasoftware:mainfrom
Conversation
…ssionEnforcement Port upstream fixes for clusters/finalizers RBAC and keep Task-based manifest generation aligned with kubebuilder RBAC markers under internal/. This updates Makefile/Taskfile generation paths and regenerates role/manifest. Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
d113413 to
305ada5
Compare
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.
Summary
Port of upstream #465.
Also includes the related upstream follow-up for Task-based generation: #426.
Problem 1: The plugin controller needs to update finalizers on
Clusterresources (to prevent deletion of clusters that have active archives), but the RBAC role was missing theclusters/finalizersupdate permission. This caused permission-denied errors in the reconciliation loop.Problem 2: The
make manifestscommand only scanned./api/...for kubebuilder RBAC markers, but the+kubebuilder:rbacannotation for clusters/finalizers is ininternal/controller/archive_controller.go. The generatedrole.yamlwas incomplete.Problem 3: CI/release manifests are generated through
task manifest(Taskfile), so fixing onlyMakefilecan still leave generated RBAC/manifests out of sync.Fix: Added
paths="./internal/..."for controller-gen inMakefileandTaskfile.ymlso RBAC markers underinternalare included. Added the+kubebuilder:rbacmarker forclusters/finalizersand regenerated RBAC/manifest artifacts.