HELM_DEP_MISSING cicd build_error ai_generated true

错误:chart 需要依赖项。Chart.yaml 有依赖项,但没有 'charts/' 目录。运行 'helm dependency update' 以生成 charts 目录。

Error: chart requires dependencies. Chart.yaml has dependencies but no 'charts/' directory. Run 'helm dependency update' to generate the charts directory.

ID: cicd/helm-chart-dependency-missing

其他格式: JSON · Markdown 中文 · English
90%修复率
87%置信度
1证据数
2023-07-05首次发现

版本兼容性

版本状态引入弃用备注
Helm 3.12.0 active
Helm 3.14.1 active

根因分析

Helm chart 在 Chart.yaml 中声明了依赖项,但 charts/ 目录缺失,因为依赖项未下载或未提交到仓库。

English

Helm chart has declared dependencies in Chart.yaml but the charts/ directory is missing because dependencies were not downloaded or committed to the repository.

generic

官方文档

https://helm.sh/docs/helm/helm_dependency/

解决方案

  1. Run 'helm dependency update ./chart-dir' in the chart directory to download dependencies into the charts/ folder. Then commit the charts/ directory to your repository.
  2. Add a CI step before deployment: 'helm dependency build ./chart-dir' to ensure dependencies are fetched fresh each build without committing charts/.

无效尝试

常见但无效的做法:

  1. 90% 失败

    Manually creating an empty charts/ directory does not resolve the error because the actual dependency packages are missing.

  2. 70% 失败

    Deleting Chart.yaml dependencies and re-adding them without running helm dependency update still leaves charts/ empty.

  3. 50% 失败

    Using helm install --dependency-update flag may fail if the chart repository is not accessible (e.g., private repo).