Kom*_*dam 30 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
Run Code Online (Sandbox Code Playgroud)
但是当我执行 helm install my_app_chart ../my_app_chart 它给出错误
Error: found in Chart.yaml, but missing in charts/ directory: mysql
Run Code Online (Sandbox Code Playgroud)
Pho*_*ixS 60
您不必将其添加到控制版本系统中,如果由于某种原因丢失了它们(例如,当您克隆存储库时),您只需重新下载它们。为此,请执行以下命令:
helm dependency update
上面的命令将下载自己的中定义的依赖requirements.yaml文件或dependencies条目中Chart.yaml的charts文件夹中。这样,需求就会更新,您将拥有正确的依赖项,而不必担心是否也在控制版本系统中更新了它们。
我更新了 .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/
Run Code Online (Sandbox Code Playgroud)
它包含图表/我删除了条目并且它起作用了
# 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/
Run Code Online (Sandbox Code Playgroud)
当我第一次开始学习如何使用 libcharts 时,我遇到了同样的错误消息,我曾经chart.yaml像这样指定 libchart 的依赖项:
图表.yaml
...
dependencies:
- name: mylibchart
version: 0.1.0
repository: file://path/to/libchart
Run Code Online (Sandbox Code Playgroud)
在 libchart Chart.yaml中数据是这样的:
apiVersion: v2
name: lib <-- this was causing the error to occur (should be mylibchart instead)
description: A Helm chart for Kubernetes
type: library
version: 0.1.0
appVersion: "1.16.0"
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,依赖项中指定的名称必须与图表/libchart 的名称相同。
| 归档时间: |
|
| 查看次数: |
29675 次 |
| 最近记录: |