go-helm-client icon indicating copy to clipboard operation
go-helm-client copied to clipboard

Do not set default chart version if version is not set

Open Magic-Mayo opened this issue 11 months ago • 0 comments

Currently, if you want to install or upgrade or template a chart and do not supply a version to use in the ChartSpec, a default version of >0.0.0-0 is set. This is the equivalent of using the helm install/upgrade/template command in the binary while also setting the --devel flag. This behavior can be dangerous if you're relying on the default being the latest stable version and not a prerelease version.

I propose the version just be left unset if not supplied. Leaving the version unset will skip prerelease versions as a viable candidate for the install/upgrade/template. Alternatively, adding a field in the ChartSpec that allows you to specify you would like to consider development versions of the chart instead of making that assumption could be an option.

https://github.com/mittwald/go-helm-client/blob/master/client.go#L300-L302 https://github.com/mittwald/go-helm-client/blob/master/client.go#L358-L360 https://github.com/mittwald/go-helm-client/blob/master/client.go#L490-L492

Magic-Mayo avatar Jan 22 '25 22:01 Magic-Mayo