From cf9c0fc68575541811624ba373e34be13445a932 Mon Sep 17 00:00:00 2001 From: irti Date: Mon, 8 Jul 2019 12:32:19 +0500 Subject: [PATCH] [fix-deployment-template] fix deployment template. Custom annotations check causing the ignore-resources field addition to fail --- .../chart/reloader/templates/deployment.yaml | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/deployments/kubernetes/chart/reloader/templates/deployment.yaml b/deployments/kubernetes/chart/reloader/templates/deployment.yaml index c52fe526..a72a2f77 100644 --- a/deployments/kubernetes/chart/reloader/templates/deployment.yaml +++ b/deployments/kubernetes/chart/reloader/templates/deployment.yaml @@ -87,27 +87,30 @@ spec: - mountPath: /tmp/ name: tmp-volume {{- end }} - {{- if .Values.reloader.custom_annotations }} args: - {{- if .Values.reloader.custom_annotations.configmap }} - - "--configmap-annotation" - - "{{ .Values.reloader.custom_annotations.configmap }}" - {{- end }} - {{- if .Values.reloader.custom_annotations.secret }} - - "--secret-annotation" - - "{{ .Values.reloader.custom_annotations.secret }}" - {{- end }} - {{- if .Values.reloader.custom_annotations.auto }} - - "--auto-annotation" - - "{{ .Values.reloader.custom_annotations.auto }}" - {{- end }} - {{- if eq .Values.reloader.ignoreSecrets true }} + + {{- if .Values.reloader.ignoreSecrets }} - "--resources-to-ignore=secrets" {{- end }} {{- if eq .Values.reloader.ignoreConfigMaps true }} - "--resources-to-ignore=configMaps" {{- end }} - {{- end }} + + {{- if .Values.reloader.custom_annotations }} + {{- if .Values.reloader.custom_annotations.configmap }} + - "--configmap-annotation" + - "{{ .Values.reloader.custom_annotations.configmap }}" + {{- end }} + {{- if .Values.reloader.custom_annotations.secret }} + - "--secret-annotation" + - "{{ .Values.reloader.custom_annotations.secret }}" + {{- end }} + {{- if .Values.reloader.custom_annotations.auto }} + - "--auto-annotation" + - "{{ .Values.reloader.custom_annotations.auto }}" + {{- end }} + {{- end }} + {{- if .Values.reloader.deployment.resources }} resources: {{ toYaml .Values.reloader.deployment.resources | indent 10 }}