ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 104 forks source link

Improve helm module idempotency checks with optional helm-diff support #248

Closed tima closed 3 years ago

tima commented 4 years ago
SUMMARY

A number of issues have been filed where Ansible does not properly detect changes in a Helm chart depending on the nature of the changes. While improved logic could and should be added to the module, for the best and most complete results, helm-diff should be integrated into the modules logic.

At this time, I am recommending this support should be made optional to avoid another hard dependency. The module should detect if helm-diff is available and use that tool if any change is present. If helm-diff is not present, the built into python checks are performed along with a warning message.

ISSUE TYPE
COMPONENT NAME

plugins/modules/helm.py

ADDITIONAL INFORMATION

This feature requests comes out of a comment in #136 and addresses the last remaining issue mentioned in #236.

This work subsumes issues #128 and #207.

goneri commented 3 years ago

Does https://github.com/ansible-collections/community.kubernetes/pull/332 address the problem?

gravesm commented 3 years ago

helm diff doesn't support using a repository url so this feature won't be able to be used in that scenario. I guess we just fall back to the existing diff functionality and add a warning message for now?

cc @Akasurde