Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm module doesn't report "status" return info, not possible to detect failures? #647

Open
gygitlab opened this issue Sep 8, 2023 · 1 comment
Labels
needs_info Needs additional information from original reporter

Comments

@gygitlab
Copy link

gygitlab commented Sep 8, 2023

SUMMARY

Apologies in advanced if I've misunderstood the docs or missed something.

The docs state that the kubernetes.core.helm module should be returning a status object that contains various information on the Helm deployment, such as status.

I was reviewing this as we've been seeing the odd failure with our charts and wanted to have Ansible throw an error in that event. We noticed that the module wasn't returning the return code from the helm command and then turned to this object but all I can see in the result is the logs (msg, stdout, stderr).

How do we detect failures from the Helm command?

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes.core.helm

ANSIBLE VERSION
ansible [core 2.15.3]
  config file = None
  configured module search path = ['<usr_dir>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = <usr_dir>/.asdf/installs/python/3.11.2/lib/python3.11/site-packages/ansible
  ansible collection location = <usr_dir>/.ansible/collections:/usr/share/ansible/collections
  executable location = <usr_dir>/.asdf/installs/python/3.11.2/bin/ansible
  python version = 3.11.2 (main, Mar  8 2023, 12:44:06) [Clang 14.0.0 (clang-1400.0.29.202)] (<usr_dir>/.asdf/installs/python/3.11.2/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection      Version
--------------- -------
kubernetes.core 2.4.0
CONFIGURATION
CALLBACKS_ENABLED(env: ANSIBLE_CALLBACKS_ENABLED) = ['profile_tasks']
CONFIG_FILE() = None
PAGER(env: PAGER) = less
OS / ENVIRONMENT

Mac OS / Linux

STEPS TO REPRODUCE

Use kubernetes.core.helm to try and deploy a Chart that's expected to fail. Notice that the task passes and there's no definitive way to detect failures from Helm.

EXPECTED RESULTS

Users have a way to detect failures from Helm.

ACTUAL RESULTS

Helm task passes quietly even though the command itself has failed.

@gravesm
Copy link
Member

gravesm commented Sep 18, 2023

If the helm command fails, the task should fail. Can you provide an example playbook and its output for a case in which you are seeing the helm command fail but the task does not?

@gravesm gravesm added the needs_info Needs additional information from original reporter label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_info Needs additional information from original reporter
Projects
None yet
Development

No branches or pull requests

2 participants