feat(helm/agent): add rbac.extraRules and rbac.extraClusterRules #1156
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.75) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #1156"
general
weight: 0.35
jannfis
What does this PR do / why we need it:
By default the agent's Role and ClusterRole only cover Argo CD's own resources, so the resource proxy cannot serve live resources of application workloads (e.g. "Live Manifest" in the Argo CD UI). Granting that access today requires creating a separate ClusterRole and binding outside the chart, so their lifecycle is not tied to the agent release.
This PR adds two opt-in values to the
argocd-agent-agentchart, both empty by default:rbac.extraRules: extra rules for the namespaced Rolerbac.extraClusterRules: extra rules for the ClusterRoleExtra rules are merged with the defaults: rules that differ only in their verbs are combined, and verbs containing
are reduced to.The default RBAC is unchanged; nothing is granted unless the values are set.
This PR also bumps
appVersiontov0.10.0, which changes the default agent image tag. It is independent of this feature and can be split out if preferred.Which issue(s) this PR fixes:
N/A (no existing issue)
Related to #1047
How to test changes / Special notes to the reviewer:
The chart has no unit tests, so the merge logic is verified by rendering with the values below. Each case can be checked with:
<details>
<summary>Test value and expected output</summary>
1. Default (empty extra rules): RBAC output is unchanged
The rendered Roles and ClusterRoles are identical to
main.2. Non-conflicting rule is added as a separate entry
3. Same apiGroups and resources as a default rule: verbs are unioned
4. Order and duplicates of
resourcesare ignored5.
resourceNamesandnonResourceURLsare respected*6. Verbs containing
are reduced to7.
extraRulesis merged into the Role8. Other checks
--set rbac.createClusterRole=false: no ClusterRole is rendered.--set agentMode=autonomous: same output asmanaged.--set rbac.extraRules=oops: rejected by the schema (got string, want array).</details>
Also verified with
helm lintandmake validate-values-schema.Checklist
[x] Documentation update is required by this PR (and has been updated) OR no documentation update is required.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
New Features
Added Helm chart settings for extending the agent’s namespace-scoped and cluster-wide permissions. Rules with matching scopes are combined, with their verbs merged.
Added guidance for granting live-resource read access without access to Secrets, including the built-in
viewrole as an alternative.Updates
* Updated the agent chart version to 0.2.9 and the application version to v0.10.0.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->