I am testing helm packaging & helm package installations, and I have pushed several versions to my helm repository (Sonatype Nexus). These are the versions that I have pushed:
- version 1.0.0 / appVersion 1.0.0
- version 1.0.1-RC / appVersion 1.0.1-RC
- version 1.0.2-RC / appVersion 1.0.2-RC
- version 1.3.0-dev-RC / appVersion 1.3.0-RC
- version 1.3.0-staging-RC / appVersion 1.3.0-RC
- version 1.3.0-dev-RELEASE / appVersion 1.3.0-RELEASE
Now when I do
helm upgrade --install myRepo/myChart
I will get version 1.0.0 installed. I can, however, do
helm upgrade --install myRepo/myChart --version 1.3.0-dev-RC
and it will install that version 1.3.0-dev-RC just fine.
Same issue for helmfile. Given this helm file:
releases:
- name: myChart
chart: myRepo/myChart
version: ">=1.0.0"
When applying, I will also get version 1.0.0 deployed.
Why is this? I would assume that helm will install the most recent version if I don't specify one.
The version numbers with hyphens are semantic versioning pre-releases (§9). The
helm installdocumentation notesHelmfile has similar rules on using stable versions only, or has a
devel: trueoption parallelinghelm install --devel.If you want the latest not-necessarily-release version, then you can use these options
Note that
--develand--versioncan't be usefully combined, and--develis equivalent to setting--version '>=0.0.0-0'. Also note that, by the semver rules,1.3.0-dev-RCis less than version1.3.0; so if you need any pre-1.3-or-later version, but not a 1.2 release, you need a syntax like