Skip to content

Add gitops.argoRBAC config key for full ArgoCD RBAC override - #754

Merged
mbaldessari merged 1 commit into
validatedpatterns:mainfrom
mbaldessari:pr2
Jul 6, 2026
Merged

mbaldessari merged 1 commit into
validatedpatterns:mainfrom
mbaldessari:pr2

Conversation

@mbaldessari

Copy link
Copy Markdown
Contributor

Allow overriding the entire ArgoCD .spec.rbac field via a YAML string
in the patterns-operator-config ConfigMap. When gitops.argoRBAC is set
and contains valid YAML, the parsed ArgoCDRBACSpec is used directly and
gitops.additionalArgoAdmins is ignored. On parse error, a warning is
logged and the operator falls back to the default RBAC configuration.

@openshift-ci
openshift-ci Bot requested review from beekhof and mhjacks July 5, 2026 13:58
@openshift-ci

openshift-ci Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mbaldessari

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Allow overriding the entire ArgoCD .spec.rbac field via a YAML string
in the patterns-operator-config ConfigMap. When gitops.argoRBAC is set
and contains valid YAML, the parsed ArgoCDRBACSpec is used directly and
gitops.additionalArgoAdmins is ignored. On parse error, a warning is
logged and the operator falls back to the default RBAC configuration.

Tested with:

  main:
    gitops:
      argoRBAC: |
        defaultPolicy: role:readonly
        policy: |-
          g, system:cluster-admins, role:admin
          g, mortaccitua, role:admin
          g, cluster-admins, role:admin
          g, admin, role:admin

Got:

  oc get -n vp-gitops argocd vp-gitops -o jsonpath='{.spec.rbac}' | jq .
  {
    "defaultPolicy": "role:readonly",
    "policy": "g, system:cluster-admins, role:admin\ng, mortaccitua, role:admin\ng, cluster-admins, role:admin\ng, admin, role:admin"
  }
@mbaldessari
mbaldessari merged commit 1035893 into validatedpatterns:main Jul 6, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant