Merge pull request #5270 from MrFreezeex/helm-kube-api

helm: add support for kube-version and add cli args for both kube-version and api-versions
This commit is contained in:
Kubernetes Prow Robot
2023-11-15 21:13:59 +01:00
committed by GitHub
8 changed files with 251 additions and 6 deletions

View File

@@ -59,6 +59,15 @@ func (p *plugin) Config(
if h.GeneralConfig().HelmConfig.Command == "" {
return fmt.Errorf("must specify --helm-command")
}
// CLI args takes precedence
if h.GeneralConfig().HelmConfig.KubeVersion != "" {
p.HelmChart.KubeVersion = h.GeneralConfig().HelmConfig.KubeVersion
}
if len(h.GeneralConfig().HelmConfig.ApiVersions) != 0 {
p.HelmChart.ApiVersions = h.GeneralConfig().HelmConfig.ApiVersions
}
p.h = h
if err = yaml.Unmarshal(config, p); err != nil {
return