fix(deploy): add missing configmaps RBAC and replace dead gcr.io kube…#407
Open
Shreesha001 wants to merge 1 commit into
Open
fix(deploy): add missing configmaps RBAC and replace dead gcr.io kube…#407Shreesha001 wants to merge 1 commit into
Shreesha001 wants to merge 1 commit into
Conversation
…-rbac-proxy image Signed-off-by: Shreesha001 <shettyshreesha552@gmail.com>
18786fc to
0d7b764
Compare
There was a problem hiding this comment.
Pull request overview
Fixes make deploy local development flow by addressing missing RBAC for ConfigMaps used early in Project reconciliation, and updating the kube-rbac-proxy image reference to a non-deprecated registry so the manager pod can start successfully.
Changes:
- Add kubebuilder RBAC marker granting
configmapsget/list/watchto the controller. - Regenerate/update
config/rbac/role.yamlto include the ConfigMap rule in the controller ClusterRole. - Replace dead
gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0image reference withquay.io/brancz/kube-rbac-proxy:v0.8.0.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| main.go | Adds kubebuilder RBAC marker for ConfigMaps to unblock Project reconciliation. |
| config/rbac/role.yaml | Adds generated ClusterRole rule allowing get/list/watch on ConfigMaps. |
| config/default/manager_auth_proxy_patch.yaml | Updates kube-rbac-proxy image to Quay to avoid ImagePullBackOff. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| //+kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch;create;update;patch;delete;escalate | ||
| //+kubebuilder:rbac:groups="",resources=secrets,verbs=create;get;list;watch;escalate;update;patch;delete | ||
| //+kubebuilder:rbac:groups="",resources=events,verbs=get;list;watch;escalate;update;patch;create | ||
| //+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch |
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
Two issues block the documented local development flow (
make deployperdeveloper_guide.md):Missing ConfigMap RBAC: the controller ClusterRole grants no
configmapsaccess, but the Project reconciler reads thenamespace-labels-configConfigMap (via the cached client, which starts a cluster-wide ConfigMap informer) as its first step and aborts on failure. Result: project namespaces are never created and the manager logs fill withconfigmaps is forbiddenwatch errors. Added a kubebuilder RBAC marker forconfigmaps(get/list/watch) and regeneratedconfig/rbac/role.yaml.Dead kube-rbac-proxy image:
gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0no longer exists (the GCR registry was shut down), so the manager pod stays inImagePullBackOff. Switched to the image's current home,quay.io/brancz/kube-rbac-proxy:v0.8.0.How Has This Been Tested?
Verified in a local Kind cluster deployed with
make deploy:configmaps is forbiddenerrors loop in the manager log.quay.ioimage, the pod reaches2/2 Running(previouslyErrImagePullon thegcr.ioimage).Checklist
Does this PR introduce a breaking change for other components like worker-operator?
No