argocd - stuck at deleting but resources are already deleted

Viewed 9495

argoproj/argocd:v1.8.7

Have a helm chart (1 with ingress, 1 with deployment/service/cm). It has sync policies of automated (prune and self-heal). When trying to delete them from the argocd dashboard, they are getting deleted (no more on the k8s cluster), however the status on the dashboard has been stuck at Deleting.

enter image description here

If I try to click sync, it shows -> Unable to deploy revision: application is deleting. Any ideas why it's stuck on Deleting status even though all resources have been deleted already ? Is there a way to refresh the status in the dashboard to reflect that actual state?

Thanks!

================

Update: After doing cascade delete, this is the screenshot (i've removed the app names that why it's white for some part) enter image description here

Doing kubectl get all -A shows all resources isn't present anymore (e.g even the cm, svc, deploy, etc)

2 Answers

I was actually able to make this work by updating the Application yaml:

  1. Add spec.syncPolicy.allowEmpty: true
  2. Remove metadata.finalizers

The working version without getting stuck at Deleting status:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
    name: service-name
    namespace: argocd
spec:
    destination:
        server: https://kubernetes.default.svc
        namespace: argocd
    project: proj-name
    source:
        path: service-name
        repoURL: ssh://...git
        targetRevision: dev
        helm:
            valueFiles:
                - ../values.yaml
                - ../values_version_dev.yaml
    syncPolicy:
        automated:
            prune: true
            allowEmpty: true
            selfHeal: true

This has happened to me several times. In every case it was because I had two declarations of applications of the same name.

Related