argocd-operator icon indicating copy to clipboard operation
argocd-operator copied to clipboard

feat: add support for rbac policy matcher mode

Open iam-veeramalla opened this issue 2 years ago • 0 comments

Signed-off-by: iam-veeramalla [email protected]

What type of PR is this?

/kind enhancement

What does this PR do / why we need it: Adds support to https://github.com/argoproj/argo-cd/pull/7165 Fixes #752 Closes #752

Have you updated the necessary documentation?

  • [x] Documentation update is required by this PR.
  • [x] Documentation has been updated.

Which issue(s) this PR fixes: Fixes #752

How to test changes / Special notes to the reviewer:

  1. Run the operator locally using make install run.
  2. Create an Argo CD instance in your preferred namespace using the below CR.
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
  name: example-argocd
  labels:
    example: basic
spec: {}
  1. Wait for the Argo CD resources.
  2. Update the Argo CD RBAC Policy matcher mode in the CR as shown below.
...
spec:
 rbac:
    policyMatcherMode: 'regex'
...
  1. Wait for the operator to reconcile the new changes.
  2. Print the Argo CD RBAC configmap to verify the field is added. kubectl -n <argocd-installed-namespace> get cm argocd-rbac-cm -o yaml
  3. Verify users are NOT allowed to change the value of policy.default: regex in the argocd-rbac-cm. Argo CD CR should be the only place to modify this.
  4. Verify users ARE allowed to change the value of policyMatcherMode in the Argo CD CR to glob and the change is reflected in argocd-rbac-cm.

iam-veeramalla avatar Aug 11 '22 14:08 iam-veeramalla