How to mass remove finalizers from argocd applications

If you are using finalizers in your argo-cd applications, you may find that it’s impossible to delete them if argo-cd installation is broken.

In order to fix it, you can either update them one by one with kubectl edit and remove the finalizer tag, or you can run following command which will patch all argocd entities in argocd namespace

kubectl get Application -A -o name | xargs kubectl patch -p '{"metadata":{"finalizers":null}}' --type=merge -n argocd

Copyright

Comments