Ingress资源在argocd中一直处于Progressing状态

kubernetes

Posted by 博海 on April 27, 2025

这个问题,其实需要分版本做不同的处理,是通过ArgoCD健康检查的自定义的资源检查来排除对Ingress的检查。

具体解决步骤如下:

kubectl edit cm -n argocd argocd-cm

集群v1.20.0及以上添加:

data:
  resource.customizations: |
    networking.k8s.io/Ingress:
        health.lua: |
          hs = {}
          hs.status = "Healthy"
          return hs
  resource.customizations.useOpenLibs.extensions_Ingress: "true"

集群v1.20.0以下添加:

data:
  resource.customizations.health.extensions_Ingress: |
    hs = {}
    hs.status = "Healthy"
    hs.message = "SoulChild"
    return hs
  resource.customizations.useOpenLibs.extensions_Ingress: "true"

最后删除argo应用控制器;并重新同步应用

kubectl delete pod -n argocd argocd-application-controller-0
sleep 10
argocd app sync <Your APP> --force

更多参考这三篇文章:

https://argo-cd.readthedocs.io/en/stable/operator-manual/health/#ingress https://github.com/argoproj/argo-cd/issues/1704
https://argoproj.github.io/argo-cd/operator-manual/health/#custom-health-checks


请保持转载后文章内容的完整,以及文章出处。本人保留所有版权相关权利。

分享到: