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

use post_renderer when checking 'changed' status for a helm release #588

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- helm - use post_renderer when checking 'changed' status for a helm release (https://github.com/ansible-collections/kubernetes.core/pull/588).
4 changes: 4 additions & 0 deletions plugins/modules/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ def helmdiff_check(
chart_version=None,
replace=False,
chart_repo_url=None,
post_renderer=False,
):
"""
Use helm diff to determine if a release would change by upgrading a chart.
Expand All @@ -645,6 +646,8 @@ def helmdiff_check(
cmd += " " + "--version=" + chart_version
if not replace:
cmd += " " + "--reset-values"
if post_renderer:
cmd += " --post-renderer=" + post_renderer

if release_values != {}:
fd, path = tempfile.mkstemp(suffix=".yml")
Expand Down Expand Up @@ -884,6 +887,7 @@ def main():
chart_version,
replace,
chart_repo_url,
post_renderer,
)
if would_change and module._diff:
opt_result["diff"] = {"prepared": prepared}
Expand Down