From 41f53d1a5277e30cc427c3c96f84c6144e4d49b1 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 20 Apr 2020 20:07:07 -0400 Subject: [PATCH] helm-template: allow users to disable wait-for-pods It's possible that a Helm chart does *not* create any pods, such as in the case if you're using Helm to manage all of your RBAC resources. Change-Id: I98b8427b1f4b6a2f454c3f796fa8a6ad2d765c46 --- roles/helm-template/README.rst | 6 ++++++ roles/helm-template/defaults/main.yaml | 1 + roles/helm-template/tasks/main.yaml | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/roles/helm-template/README.rst b/roles/helm-template/README.rst index 4717b0bf1..2e241bf6d 100644 --- a/roles/helm-template/README.rst +++ b/roles/helm-template/README.rst @@ -11,6 +11,12 @@ already setup and the Helm executable is installed. Directory of the Helm chart. +.. zuul:rolevar:: helm_wait_for_pods + :default: True + + Determine if the role should wait for all pods to go up after it applies + the template. + .. zuul:rolevar:: zuul_work_dir :default: {{ zuul.project.src_dir }} diff --git a/roles/helm-template/defaults/main.yaml b/roles/helm-template/defaults/main.yaml index 9739eb171..08450f912 100644 --- a/roles/helm-template/defaults/main.yaml +++ b/roles/helm-template/defaults/main.yaml @@ -1 +1,2 @@ +helm_wait_for_pods: true zuul_work_dir: "{{ zuul.project.src_dir }}" diff --git a/roles/helm-template/tasks/main.yaml b/roles/helm-template/tasks/main.yaml index 010141774..aa146e92d 100644 --- a/roles/helm-template/tasks/main.yaml +++ b/roles/helm-template/tasks/main.yaml @@ -18,4 +18,5 @@ - name: Wait for all pods to become Ready include_role: - name: wait-for-pods \ No newline at end of file + name: wait-for-pods + when: helm_wait_for_pods | bool