kubernetes.core.helm – Manages Kubernetes packages with the Helm package manager¶
Note
This plugin is part of the kubernetes.core collection (version 1.2.1).
To install it use: ansible-galaxy collection install kubernetes.core
.
To use it in a playbook, specify: kubernetes.core.helm
.
New in version 0.11.0: of kubernetes.core
Synopsis¶
Install, upgrade, delete packages with the Helm package manager.
Note
This module has a corresponding action plugin.
Requirements¶
The below requirements are needed on the host that executes this module.
Parameters¶
Examples¶
- name: Deploy latest version of Prometheus chart inside monitoring namespace (and create it)
kubernetes.core.helm:
name: test
chart_ref: stable/prometheus
release_namespace: monitoring
create_namespace: true
# From repository
- name: Add stable chart repo
kubernetes.core.helm_repository:
name: stable
repo_url: "https://kubernetes.github.io/ingress-nginx"
- name: Deploy latest version of Grafana chart inside monitoring namespace with values
kubernetes.core.helm:
name: test
chart_ref: stable/grafana
release_namespace: monitoring
values:
replicas: 2
- name: Deploy Grafana chart on 5.0.12 with values loaded from template
kubernetes.core.helm:
name: test
chart_ref: stable/grafana
chart_version: 5.0.12
values: "{{ lookup('template', 'somefile.yaml') | from_yaml }}"
- name: Deploy Grafana chart using values files on target
kubernetes.core.helm:
name: test
chart_ref: stable/grafana
release_namespace: monitoring
values_files:
- /path/to/values.yaml
- name: Remove test release and waiting suppression ending
kubernetes.core.helm:
name: test
state: absent
wait: true
# From git
- name: Git clone stable repo on HEAD
ansible.builtin.git:
repo: "http://github.com/helm/charts.git"
dest: /tmp/helm_repo
- name: Deploy Grafana chart from local path
kubernetes.core.helm:
name: test
chart_ref: /tmp/helm_repo/stable/grafana
release_namespace: monitoring
# From url
- name: Deploy Grafana chart on 5.6.0 from url
kubernetes.core.helm:
name: test
chart_ref: "https://github.com/grafana/helm-charts/releases/download/grafana-5.6.0/grafana-5.6.0.tgz"
release_namespace: monitoring
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Lucas Boisserie (@LucasBoisserie)
Matthieu Diehr (@d-matt)