Skip to content
Open
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
20 changes: 20 additions & 0 deletions docs/kubernetes.core.helm_template_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,26 @@ Parameters
<div>Skip TLS certificate checks for the chart download</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>kube_version</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
<div style="font-style: italic; font-size: small; color: darkgreen">added in 5.3.0</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
<li>yes</li>
</ul>
</td>
<td>
<div>Kubernetes version used for Capabilities. If this is not specified, the version defaults to the kube version that is bundled within helm.</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
Expand Down
12 changes: 12 additions & 0 deletions plugins/modules/helm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
required: false
type: bool
default: false
kube_version:
description:
- Kubernetes version used for Capabilities
required: false
type: str
output_dir:
description:
- Output directory where templates will be written.
Expand Down Expand Up @@ -235,6 +240,7 @@ def template(
release_values=None,
values_files=None,
include_crds=False,
kube_version=None,
set_values=None,
):
cmd += " template "
Expand Down Expand Up @@ -282,6 +288,9 @@ def template(
if include_crds:
cmd += " --include-crds"

if kube_version:
cmd += " --kube-version=" + kube_version

if set_values:
cmd += " " + set_values

Expand All @@ -298,6 +307,7 @@ def main():
dependency_update=dict(type="bool", default=False, aliases=["dep_up"]),
disable_hook=dict(type="bool", default=False),
include_crds=dict(type="bool", default=False),
kube_version=dict(type="str"),
release_name=dict(type="str", aliases=["name"]),
output_dir=dict(type="path"),
insecure_registry=dict(type="bool", default=False),
Expand All @@ -318,6 +328,7 @@ def main():
dependency_update = module.params.get("dependency_update")
disable_hook = module.params.get("disable_hook")
include_crds = module.params.get("include_crds")
kube_version = module.params.get("kube_version")
release_name = module.params.get("release_name")
output_dir = module.params.get("output_dir")
insecure_registry = module.params.get("insecure_registry")
Expand Down Expand Up @@ -356,6 +367,7 @@ def main():
show_only=show_only,
values_files=values_files,
include_crds=include_crds,
kube_version=kube_version,
set_values=set_values_args,
)

Expand Down