You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ArgoCD能否从Git仓库部署Helm Chart?同步挂起问题求助

问题

ArgoCD是否可以从Git仓库而非Helm仓库部署Helm Chart?用户尝试了以下Application定义,但ArgoCD无任何日志输出且同步过程持续挂起:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: guestbook
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  destination:
    namespace: guestbook
    server: "https://kubernetes.default.svc"
  source:
    helm:
      valueFiles:
        - "values.yaml"
    repoURL: 'https://{private git server}/guestbook'
    targetRevision: HEAD

Git仓库https://{private git server}/guestbook的Helm Chart文件结构如下:

- charts (folder)
- templates (folder)
- Chart.yaml
- values.yaml

补充信息:在克隆后的Git仓库根目录执行helm install guestbook . --namespace guestbook可成功部署该Helm Chart,且ArgoCD已在控制台配置该Git仓库及访问凭证,连接正常。

解答
  • ArgoCD完全支持从Git仓库部署Helm Chart,无需依赖Helm仓库。
  • 你的Application定义缺少关键配置:需要在spec.source下添加path: "."字段。当repoURL指向包含Helm Chart的Git仓库时,ArgoCD需要明确读取Chart的路径,即便Chart在仓库根目录,也必须显式指定。

修改后的完整Application配置如下:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: guestbook
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
spec:
  project: default
  destination:
    namespace: guestbook
    server: "https://kubernetes.default.svc"
  source:
    helm:
      valueFiles:
        - "values.yaml"
    repoURL: 'https://{private git server}/guestbook'
    targetRevision: HEAD
    path: "." # 新增指定Chart路径的配置
  • 额外排查建议:
    • 确认ArgoCD的服务账号具备目标命名空间guestbook的访问权限
    • 查看repo-server日志排查隐藏问题:kubectl logs -n argocd deployment/argocd-repo-server

内容的提问来源于stack exchange,提问作者AndCode

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 15:42:46