Argocd-状态停留在Deleting,但资源已删除

如上图所示,该应用所对应的资源均已被删除,但是 **argocd **这边一直卡住“Deleting”状态。

解决方法

  1. 添加 spec.syncPolicy.allowEmpty: true
1
2
3
4
5
6
7
8
9
10
11
12
13
14
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: service-name
namespace: argocd
spec:
...
project: proj-name
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
...
  1. 移除 metadata.finalizers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: service-name
namespace: argocd
# finalizers:
# - resources-finalizer.argocd.argoproj.io
spec:
...
project: proj-name
syncPolicy:
automated:
prune: true
allowEmpty: true
selfHeal: true
...

如上所示,移除 metadata.finalizers ,再进行删除即可

阿里云 K8S

参考文章