fix(rbac): grant get on configmaps/secrets to jobs-manager SA#183
Merged
shujaatTracebloc merged 1 commit intoJun 3, 2026
Merged
Conversation
The ingestion endpoint's orphan-resource verify path (client-runtime#52) and missing-row self-heal (client-runtime#54) read the existing ConfigMap/Secret on a create-409 to confirm content matches before reuse. The Role/ClusterRole only granted `create`, so those reads returned Forbidden and the endpoint 500'd instead of the intended 409/200-replay — verified live on the dev cluster. Add `get` alongside `create` in both the ClusterRole (clusterScope: true) and namespace Role (clusterScope: false) branches. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
👋 Heads-up — Code review queue is at 19 / 8 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
This was referenced Jun 2, 2026
Merged
saadqbal
approved these changes
Jun 3, 2026
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
The ingestion endpoint (
POST /internal/submit-ingestion-run) on jobs-manager reads the existing ConfigMap/Secret on a create-409 to verify content before reuse:_verify_existing_configmap_matches/_verify_existing_secret_matches_self_heal_or_concurrent_conflictBoth call
read_namespaced_config_map/read_namespaced_secret, which require thegetverb. The Role/ClusterRole only grantedcreate, so on the real cluster those reads return Forbidden and the endpoint returns 500 instead of the intended 409 / 200-replay.Fix
Add
getalongsidecreateon["configmaps", "secrets"]in both the ClusterRole (clusterScope: true) and namespace Role (clusterScope: false) branches ofclient/templates/rbac.yaml.Verification (dev cluster
tb-client-dev-templates)Reproduced live: with only
create, planting an orphan ConfigMap + re-POSTing returned:After temporarily granting
get, the same requests returned the intended results — orphan-content mismatch → 409, matching content → 201/200 replay, and #54's self-heal → 200 replay. This PR makes that grant permanent.helm templaterenders cleanly in bothclusterScopebranches withverbs: ["create", "get"].Unblocks the orphan-recovery / self-heal paths shipped in client-runtime #52 and #54, which are non-functional in dev/prod until this lands.
🤖 Generated with Claude Code
Note
Low Risk
Small, scoped RBAC verb addition on resources the SA already creates; fixes broken 409/replay paths without changing auth or ingestion logic.
Overview
Grants the jobs-manager service account
getonconfigmapsandsecrets(in addition tocreate) inclient/templates/rbac.yaml, for bothclusterScope: true(ClusterRole) andclusterScope: false(namespace Role).That permission is needed when ingestion creates a ConfigMap/Secret and Kubernetes returns 409: jobs-manager must read the existing object to verify content (orphan recovery) or self-heal/replay. Without
get, those reads fail with Forbidden andPOST /internal/submit-ingestion-runreturns 500 instead of the intended 409 or replay behavior from client-runtime #52 / #54.Reviewed by Cursor Bugbot for commit 1070ca1. Bugbot is set up for automated code reviews on this repo. Configure here.