Fix helm chart image version#546
Conversation
Why? We control the appVersion, no? Why do we make the chart resilient against ourselves here? I am so confused... Why would the chart ever be published with a broken appVersion field? |
|
thought it was for the dev setup, now I see that latest tagged helm chart has a wrong appVersion, we should fix it |
|
It might be now knowing helm again. But helm charts (OCI charts) dont accepts Maybe its issue with helm publishing?
helm complains if OCI helm image is with |
|
well, I ran into that when running development image and helm chart |
|
So either this or we need to make sure helm charts stays without |
|
Helm chart's |
4dd2356 to
81f09fe
Compare
| sed -i.tmp "s/^version:.*/version: $CHART_VERSION/" "${chart_dir}Chart.yaml" | ||
| sed -i.tmp "s/^appVersion:.*/appVersion: $CHART_VERSION/" "${chart_dir}Chart.yaml" | ||
| sed -i.tmp "s/^appVersion:.*/appVersion: v$CHART_VERSION/" "${chart_dir}Chart.yaml" |
There was a problem hiding this comment.
I vote for a cleanup:
- Rename
CHART_VERSIONin theimageworkflow toAPP_VERSION. Also do not strip the leadingvoff it anymore (i.e. instead of running this script withCHART_VERSION=0.8.1, it should be run withAPP_VERSION=v.0.8.1). - Strip the leading
vhere in this script to form a validversionfor the Helm chart. - Replace
versionandappVersionin the Chart.yaml with0.0.0to indicate that their values are entirely irrelevant, should never be touched and would be overwritten with every kube-bind release anyway. Ideally a small comment# updated by helm-build.sh during the buildis placed somewhere in there, too.
My reasoning is that my brain finds the thought
the chart version is used as the app version
more confusing than
the app version is also used as the chart version
^^ Especially since we're not actually maintining a dedicated version just for the chart, we derive it from the appVersion (the Git tag).
There was a problem hiding this comment.
Feel free to contribute. I dont see this complex, so if you have ideas how to make it better - take a stab.
|
closing in favor of #554 |
Summary
What Type of PR Is This?
Make the default image tag tolerate both v-prefixed and unprefixed
Chart.appVersionby stripping any leading v and always prepending one. Fixes installs failing withImagePullBackOffwhenappVersionis published without the v prefix (e.g.0.8.1(how helm charts does it) while images are tagged v0.8.1.Related Issue(s)
Fixes #
Release Notes