kubernetes.core
kubernetes.core copied to clipboard
Helm module doesn't report "status" return info, not possible to detect failures?
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.