helm-template: enable using values file

This patch allows the user to use a provided values file when running
the helm-template role.

Change-Id: I8e0988c8ec58a33228a326145458a9a0fca323a0
This commit is contained in:
Mohammed Naser 2020-04-20 20:07:55 -04:00
parent 41f53d1a52
commit 0e67960f64
2 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,10 @@ already setup and the Helm executable is installed.
Determine if the role should wait for all pods to go up after it applies
the template.
.. zuul:rolevar:: helm_values_file
File containing Helm values to use when templating.
.. zuul:rolevar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}

View File

@ -11,7 +11,7 @@
- name: Deploy templated charts
shell: |
set -o pipefail
helm template -n {{ helm_release_name }} {{ helm_chart }} | kubectl apply -f-
helm template {% if helm_values_file %}--values {{ helm_values_file }} {% endif %}-n {{ helm_release_name }} {{ helm_chart }} | kubectl apply -f-
args:
executable: /bin/bash
chdir: "{{ zuul_work_dir }}"