错误:在Chart.yaml中找到,但在Charts /目录中丢失:mysql

时间:2019-12-06 09:19:21

标签: kubernetes kubernetes-helm

我在requirements.yaml中添加了mysql。 Helm依赖项下载mysql图表

helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nginx" chart repository
...Successfully got an update from the "stable" chart repository

Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading mysql from repo <our private repository>
Deleting outdated charts

但是当我掌舵时,请安装my_app_chart ../my_app_chart 它给出了错误

Error: found in Chart.yaml, but missing in charts/ directory: mysql

2 个答案:

答案 0 :(得分:19)

您不必将其添加到控制版本系统中,如果由于某种原因丢失了它们(例如,克隆存储库时),只需再次下载它们。为此,请执行以下命令:

helm dependency update

以上命令会将您在requirements.yaml文件或dependencies中的Chart.yaml条目中定义的依赖项下载到charts文件夹中。这样,需求就会更新,您将拥有正确的依赖关系,而不必担心是否也在控制版本系统中更新了需求。

答案 1 :(得分:2)

我更新了.helmignore

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
charts/

其中包含图表/我删除了该条目并成功了

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/