mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 10:41:53 +02:00
Support the latest Helm (>=v3.3.2) and bump the Helm version in Docker image. (#1488)
Changes: * Bump Helm to v2.16.12 and v3.3.3. * Add --force-update only when using Helm 3.
This commit is contained in:
@@ -130,6 +130,9 @@ func (helm *execer) AddRepo(name, repository, cafile, certfile, keyfile, usernam
|
||||
return fmt.Errorf("empty field name")
|
||||
}
|
||||
args = append(args, "repo", "add", name, repository)
|
||||
if helm.IsHelm3() && helm.IsVersionAtLeast(3, 3, 2) {
|
||||
args = append(args, "--force-update")
|
||||
}
|
||||
if certfile != "" && keyfile != "" {
|
||||
args = append(args, "--cert-file", certfile, "--key-file", keyfile)
|
||||
}
|
||||
@@ -398,6 +401,6 @@ func (helm *execer) GetVersion() Version {
|
||||
return helm.version
|
||||
}
|
||||
|
||||
func (helm *execer) IsVersionAtLeast(major int, minor int) bool {
|
||||
return helm.version.Major >= major && helm.version.Minor >= minor
|
||||
func (helm *execer) IsVersionAtLeast(major int, minor int, patch int) bool {
|
||||
return helm.version.Major >= major && helm.version.Minor >= minor && helm.version.Patch >= patch
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user