argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.96k stars 5.47k forks source link

ArgoCD is not able to create clusterrole and clusterrolebinding resources #17353

Open mickymics opened 8 months ago

mickymics commented 8 months ago

Checklist:

Describe the bug

I have a k8s yaml spec file which contains multiple k8s resource definition, I want to deploy the following resources

apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: kubernetes.io/bootstrapping: rbac-defaults name: test-psp-infra rules:

Getting error in ArgoCD UI - Failed sync attempt to 7c9bbd967b1c6a0778bf65c0cc4c3793de0b493e: one or more objects failed to apply, reason: error running rbacReconcile: error running kubectl auth reconcile: admission webhook "cluster.kube-admission.kube-system.svc" denied the request: apps are not allowed to create cluster wide resources

To Reproduce

Trying to deploy the above resources with kubectl, and it's getting created but through ARGOCD both sync and refresh failed with the error mentioned above

Expected behavior

It should creates the cluster wide resources.

Screenshots

Version

Paste the output from `argocd version` here.

Logs

Paste any relevant application logs here.
andrii-korotkov-verkada commented 6 days ago

What's your argocd version?