.. _kubernetes.core.helm_module: ******************** kubernetes.core.helm ******************** **Manages Kubernetes packages with the Helm package manager** Version added: 0.11.0 .. contents:: :local: :depth: 1 Synopsis -------- - Install, upgrade, delete packages with the Helm package manager. Requirements ------------ The below requirements are needed on the host that executes this module. - helm (https://github.com/helm/helm/releases) - yaml (https://pypi.org/project/PyYAML/) Parameters ---------- .. raw:: html
| Parameter | Choices/Defaults | Comments | |
|---|---|---|---|
|
api_key
string
added in 1.2.0
|
Token used to authenticate with the API. Can also be specified via
K8S_AUTH_API_KEY environment variable. |
||
|
atomic
boolean
|
|
If set, the installation process deletes the installation on failure.
|
|
|
binary_path
path
|
The path of a helm binary to use.
|
||
|
ca_cert
path
added in 1.2.0
|
Path to a CA certificate used to authenticate with the API. The full certificate chain must be provided to avoid certificate validation errors. Can also be specified via
K8S_AUTH_SSL_CA_CERT environment variable.aliases: ssl_ca_cert |
||
|
chart_ref
path
|
chart_reference on chart repository.
path to a packaged chart.
path to an unpacked chart directory.
absolute URL.
Required when release_state is set to
present. |
||
|
chart_repo_url
string
|
Chart repository URL where to locate the requested chart.
|
||
|
chart_version
string
|
Chart version to install. If this is not specified, the latest version is installed.
|
||
|
context
string
|
Helm option to specify which kubeconfig context to use.
If the value is not specified in the task, the value of environment variable
K8S_AUTH_CONTEXT will be used instead.aliases: kube_context |
||
|
create_namespace
boolean
added in 0.11.1
|
|
Create the release namespace if not present.
|
|
|
dependency_update
boolean
added in 2.4.0
|
|
Run standalone
helm dependency update CHART before the operation.Run inline
--dependency-update with helm install command. This feature is not supported yet with the helm upgrade command.So we should consider to use dependency_update options with replace option enabled when specifying chart_repo_url.
The dependency_update option require the add of
dependencies block in Chart.yaml/requirements.yaml file.For more information please visit https://helm.sh/docs/helm/helm_dependency/
aliases: dep_up |
|
|
disable_hook
boolean
|
|
Helm option to disable hook on install/upgrade/delete.
|
|
|
force
boolean
|
|
Helm option to force reinstall, ignore on new install.
|
|
|
history_max
integer
added in 2.2.0
|
Limit the maximum number of revisions saved per release.
mutually exclusive with with
replace. |
||
|
host
string
added in 1.2.0
|
Provide a URL for accessing the API. Can also be specified via
K8S_AUTH_HOST environment variable. |
||
|
insecure_skip_tls_verify
boolean
added in 5.3.0
|
|
Skip tls certificate checks for the chart download.
Do not confuse with the
validate_certs option.This option is only available for helm >= 3.16.0.
aliases: skip_tls_certs_check |
|
|
kubeconfig
raw
|
Helm option to specify kubeconfig path to use.
If the value is not specified in the task, the value of environment variable
K8S_AUTH_KUBECONFIG will be used instead.The configuration can be provided as dictionary. Added in version 2.4.0.
aliases: kubeconfig_path |
||
|
plain_http
boolean
added in 6.1.0
|
|
Use HTTP instead of HTTPS when working with OCI registries
Requires Helm >= 3.13.0
|
|
|
post_renderer
string
added in 2.4.0
|
Path to an executable to be used for post rendering.
|
||
|
purge
boolean
|
|
Remove the release from the store and make its name free for later use.
|
|
|
release_name
string
/ required
|
Release name to manage.
aliases: name |
||
|
release_namespace
string
/ required
|
Kubernetes namespace where the chart should be installed.
aliases: namespace |
||
|
release_state
string
|
|
Desirated state of release.
aliases: state |
|
|
release_values
dictionary
|
Default: {}
|
Value to pass to chart.
aliases: values |
|
|
replace
boolean
added in 1.11.0
|
|
Reuse the given name, only if that name is a deleted release which remains in the history.
This is unsafe in production environment.
mutually exclusive with with
history_max. |
|
|
reset_then_reuse_values
boolean
added in 6.0.0
|
|
When upgrading package, reset the values to the ones built into the chart, apply the last release's values and merge in any overrides from parameters O(release_values), O(values_files) or O(set_values).
If O(reset_values) or O(reuse_values) is set to V(True), this is ignored.
This feature requires helm diff >= 3.9.12.
|
|
|
reset_values
boolean
added in 3.0.0
|
|
When upgrading package, reset the values to the ones built into the chart.
|
|
|
reuse_values
boolean
added in 3.0.0
|
|
When upgrading package, specifies wether to reuse the last release's values and merge in any overrides from parameters release_values, values_files or set_values.
If reset_values is set to
True, this is ignored. |
|
|
set_values
list
/ elements=dictionary
added in 2.4.0
|
Values to pass to chart configuration
|
||
|
value
string
/ required
|
Value to pass to chart configuration (e.g phase=prod).
|
||
|
value_type
-
|
|
Use
raw set individual value.Use
string to force a string for an individual value.Use
file to set individual values from a file when the value itself is too long for the command line or is dynamically generated.Use
json to set json values (scalars/objects/arrays). This feature requires helm>=3.10.0. |
|
|
skip_crds
boolean
added in 1.2.0
|
|
Skip custom resource definitions when installing or upgrading.
|
|
|
skip_schema_validation
boolean
added in 6.2.0
|
|
Disables JSON schema validation for Chart and values.
This feature requires helm >= 3.16.0
|
|
|
take_ownership
boolean
added in 6.1.0
|
|
When upgrading, Helm will ignore the check for helm annotations and take ownership of the existing resources
This feature requires helm >= 3.17.0
|
|
|
timeout
string
added in 2.3.0
|
A Go duration (described here https://pkg.go.dev/time#ParseDuration) value to wait for Kubernetes commands to complete. This defaults to 5m0s.
similar to
wait_timeout but does not required wait to be activated.Mutually exclusive with
wait_timeout. |
||
|
update_repo_cache
boolean
|
|
Run
helm repo update before the operation. Can be run as part of the package installation or as a separate step (see Examples). |
|
|
validate_certs
boolean
added in 1.2.0
|
|
Whether or not to verify the API server's SSL certificates. Can also be specified via
K8S_AUTH_VERIFY_SSL environment variable.aliases: verify_ssl |
|
|
values_files
list
/ elements=string
added in 1.1.0
|
Default: []
|
Value files to pass to chart.
Paths will be read from the target host's filesystem, not the host running ansible.
values_files option is evaluated before values option if both are used.
Paths are evaluated in the order the paths are specified.
|
|
|
wait
boolean
|
|
When release_state is set to
present, wait until all Pods, PVCs, Services, and minimum number of Pods of a Deployment are in a ready state before marking the release as successful.When release_state is set to
absent, will wait until all the resources are deleted before returning. It will wait for as long as wait_timeout. This feature requires helm>=3.7.0. Added in version 2.3.0. |
|
|
wait_timeout
string
|
Timeout when wait option is enabled (helm2 is a number of seconds, helm3 is a duration).
The use of wait_timeout to wait for kubernetes commands to complete has been deprecated and will be removed after 2022-12-01.
|
||