Skip to content

Commit

Permalink
consider support helm < 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yurnov committed Dec 11, 2024
1 parent 8d2ddf2 commit f20004d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions plugins/module_utils/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def _prepare_helm_environment(self):
env_update["KUBECONFIG"] = kubeconfig_path
self.add_cleanup_file(kubeconfig_path)

if LooseVersion(self.get_helm_version()) < LooseVersion("3.0.0"):
env_update["HELM_EXPERIMENTAL_OCI"] = "1"

return env_update

@property
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/helm_registry_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ def main():
else:
module.fail_json(
msg="Failure when executing Helm command. Exited {0}.\nstdout: {1}\nstderr: {2}".format(
rc, out, err
),
command=helm_cmd,
)
rc, out, err
),
command=helm_cmd,
)

module.exit_json(changed=changed, stdout=out, stderr=err, command=helm_cmd)

Expand Down

0 comments on commit f20004d

Please sign in to comment.