这是关于helm get syntax for getting the chart of a release的补充问题。
我想了解helm是否支持以下用例:
foo
,它存储在笔记本电脑文件系统的目录中:
[alice-laptop]$ helm create foo
# Alice fiddles with contents of foo, like Chart.yaml, templates...
foo
版本,调用实例bar
:
[alice-laptop]$ helm install -n bar foo
bar
,并开始另一个释放tut
安全摆弄。所以Bob希望运行一些命令来检索foo
生成时使用的图表bar
(不仅仅是名称,而是所有工件!),对它们进行更改并以正确的方式使用helm:
[bob-laptop]$ helm whatever-command-if-possible bar
# ideally Bob has a `foo' directory now and can fiddle with it...
# ... to make the required changes for release `bar'
[bob-laptop]$ helm update bar foo
# ... and to install another release `tut'
[bob-laptop]$ helm install -n tut foo
鲍勃读到get
可能是上面的工作whatever-command-if-possible
的正确工具,但不知道是否是这种情况,或者是否可以这样做。
不,以下用例是不可能的。
您只能检索用于从chart Repository创建发布的特定图表
您可能想阅读share your charts with others部分
首先,Alice和Bob应该有一个共同的图表存储库。在这个例子中,他们使用的是公共GCP Bucket通用图表。
在去度假之前,在Alice创建并完成在图表上工作之后(以及在创建版本之前),她应该打包图表。
[alice-laptop]$ helm package foo
这将创建foo-0.1.0.tgz图表包。
Successfully packaged chart and saved it to: C:\home\stack\foo-0.1.0.tgz
Alice创建index file并将包和索引文件上传到GCP Bucket
[alice-laptop]$ mkdir common-charts
[alice-laptop]$ mv foo-0.1.0.tgz common-charts
[alice-laptop]$ helm repo index common-charts --url https://common-charts.storage.googleapis.com
[alice-laptop]$ gsutil cp common-charts\* gs://common-charts
Copying file://common-charts\foo-0.1.0.tgz [Content-Type=application/x-tar]...
Copying file://common-charts\index.yaml [Content-Type=application/octet-stream]...
\ [2 files][ 1.8 KiB/ 1.8 KiB]
Operation completed over 2 objects/1.8 KiB.
当她离开时,Bob可以从公共图表图表库下载foo图表,解压缩并应用更改。
[bob-laptop]$ helm repo add common-charts https://common-charts.storage.googleapis.com
[bob-laptop]$ helm search foo
NAME CHART VERSION APP VERSION DESCRIPTION
common-charts/foo 0.1.0 1.0 A Helm chart for Kubernetes
[bob-laptop]$ helm fetch common-charts/foo --untar
[bob-laptop]$ ls -la
drwxr-xr-x 1 bob 1049089 0 Dec 20 12:15 foo/
鲍勃也可以add new charts to existing repo和爱丽丝可以在她回来时下载它们。