Helm chart versions for CI/CD

穿精又带淫゛_ 提交于 2019-12-11 11:58:07

问题


I have a helm repository set up for my CI/CD pipeline, but the one thing I am having trouble with is helm's versioning system which is focused on a semantic versioning system as in x.x.x.

I want to be able to specify tags like "staging", "latest", and "production", and although I am able to successfully upload charts with string versions

NAME CHART VERSION APP VERSION chartmuseum/myrchart latest 1.0

Any attempt to actually access the chart fails, such as

helm inspect chartmuseum/mychart --version=latest

Generates the error:

Error: failed to download "chartmuseum/mychart" (hint: running 'helm repo update' may help)

I don't really want to get into controlled semantic versioning at this point in development, or the mess that is appending hashes to a version. Is there any way to get helm to pull non-semantically tagged chart versions?


回答1:


My approach to this, where I do not want to version my chart (and subcharts) semanticaly as well is not to use helm repository at all and just pull whole chart in CI/CD from git instead. If you are publishing them to wider audience this may not suit you, but for own CI/CD which is authorized to access our repositories anyway it works like charm.




回答2:


I found something that worked for me. Since the semvar allows you to append values after the last number like 0.1.0-aebcaber, I've taken to simply using 0.1.0-latest and overwriting that in chartmuseum on uploads.



来源:https://stackoverflow.com/questions/51730497/helm-chart-versions-for-ci-cd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!