argocd-operator
argocd-operator copied to clipboard
feat: add support for rbac policy matcher mode
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:
- Run the operator locally using
make install run
. - 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: {}
- Wait for the Argo CD resources.
- Update the Argo CD RBAC Policy matcher mode in the CR as shown below.
...
spec:
rbac:
policyMatcherMode: 'regex'
...
- Wait for the operator to reconcile the new changes.
- Print the Argo CD RBAC configmap to verify the field is added.
kubectl -n <argocd-installed-namespace> get cm argocd-rbac-cm -o yaml
- Verify users are NOT allowed to change the value of
policy.default: regex
in theargocd-rbac-cm
. Argo CD CR should be the only place to modify this. - Verify users ARE allowed to change the value of
policyMatcherMode
in the Argo CD CR toglob
and the change is reflected inargocd-rbac-cm
.