From bc8e16fc694950a319d770a31ffa8997ebb0f0d0 Mon Sep 17 00:00:00 2001
From: dlandtwing <58557226+dlandtwing@users.noreply.github.com>
Date: Wed, 30 Sep 2020 16:23:26 +0200
Subject: [PATCH] nginx ingress: fix yaml for multiple nodeselectors (#6768)

In case multiple nodeselectors are specified in ingress_nginx_nodeselector, the generated daemonset yaml template for nginx is invalid due to missing indentation starting with the second nodeselector
---
 .../ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2 b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2
index 039ccd01d..f0db47bcd 100644
--- a/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2
+++ b/roles/kubernetes-apps/ingress_controller/ingress_nginx/templates/ds-ingress-nginx-controller.yml.j2
@@ -28,7 +28,7 @@ spec:
 {% endif %}
 {% if ingress_nginx_nodeselector %}
       nodeSelector:
-        {{ ingress_nginx_nodeselector | to_nice_yaml }}
+        {{ ingress_nginx_nodeselector | to_nice_yaml | indent(width=8) }}
 {%- endif %}
 {% if ingress_nginx_tolerations %}
       tolerations:
-- 
GitLab