diff --git a/roles/helm-template/README.rst b/roles/helm-template/README.rst index 2e241bf6d..8b3139830 100644 --- a/roles/helm-template/README.rst +++ b/roles/helm-template/README.rst @@ -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 }} diff --git a/roles/helm-template/tasks/main.yaml b/roles/helm-template/tasks/main.yaml index aa146e92d..6eb052aae 100644 --- a/roles/helm-template/tasks/main.yaml +++ b/roles/helm-template/tasks/main.yaml @@ -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 }}"