Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a typo in README #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TerrySolar
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jul 30, 2019

CLA assistant check
All committers have signed the CLA.

@TerrySolar
Copy link
Author

TerrySolar commented Jul 30, 2019

https://hub.docker.com/r/somefive/hello-world/tags

Tags (2)
1.0.0 7 MB
Last update: 20 days ago
dev 7 MB
Last update: 20 days ago

@@ -37,7 +37,7 @@ Helm Chart对于应用的打包,不仅仅是将Deployment和Service以及其

在根目录下我们看到有一个`values.yaml`文件,这个文件提供了应用在安装时的默认参数。在默认的`Values`中,我们看到`replicaCount: 1`说明该应用在默认部署的状态下只有一个副本。

为了使用我们要部署应用的镜像,我们看到deployment.yaml里在`spec.template.spec.containers`里,`image`和`imagePullPolicy`都使用了`Values`中的值。其中`image`字段由`.Values.image.repository`和`.Chart.AppVersion`组成。看到这里,同学们应该就知道我们需要变更的字段了,一个是位于values.yaml内的`image.repository`,另一个是位于Chart.yaml里的`AppVersion`。我们将它们与我们需要部署应用的docker镜像匹配起来。这里我们把values.yaml里的`image.repository`设置成`somefive/hello-world`,把Chart.yaml里的`AppVersion`设置成`1.0.0`即可。
为了使用我们要部署应用的镜像,我们看到deployment.yaml里在`spec.template.spec.containers`里,`image`和`imagePullPolicy`都使用了`Values`中的值。其中`image`字段由`.Values.image.repository`和`.Chart.AppVersion`组成。看到这里,同学们应该就知道我们需要变更的字段了,一个是位于values.yaml内的`image.repository`,另一个是位于Chart.yaml里的`AppVersion`。我们将它们与我们需要部署应用的docker镜像匹配起来。这里我们把values.yaml里的`image.repository`设置成`somefive/hello-world`,`image.tag`设置成`1.0.0`即可。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方就是重用了 AppVersion ,没有问题。

@Somefive
Copy link
Contributor

Somefive commented Jul 31, 2019

In deployment.yaml, we set the image field to "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" which reuse field AppVersion (appVersion) in Chart.yaml.
You can add image.tag field in values.yaml and set image url in template/deployment.yaml in your own way.
BTW, the first one is a typo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants