From fadd949fc0374d707fa13c04fe86924ef43ca04d Mon Sep 17 00:00:00 2001 From: Scott Crossen Date: Mon, 16 Aug 2021 01:21:58 -0700 Subject: [PATCH] fix(kratos): correct initContainer formatting (#310) https://github.com/ory/k8s/pull/300 Added support for init-containers, but the way they were implemented led helm to interpret them as strings instead of as yaml. This was an error of communication between author and reviewer. Example of how this is currently parsed: ``` initContainers: | - command: ... ``` I'm not sure why exactly the bar gets added but it does --- helm/charts/kratos/templates/deployment.yaml | 2 +- helm/charts/kratos/templates/job-migration.yaml | 2 +- helm/charts/kratos/templates/statefulset-mail.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/helm/charts/kratos/templates/deployment.yaml b/helm/charts/kratos/templates/deployment.yaml index 8999caa50b..45e353124c 100644 --- a/helm/charts/kratos/templates/deployment.yaml +++ b/helm/charts/kratos/templates/deployment.yaml @@ -42,7 +42,7 @@ spec: {{- if .Values.deployment.extraInitContainers}} initContainers: {{- if .Values.deployment.extraInitContainers }} -{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }} +{{ tpl .Values.deployment.extraInitContainers . | indent 8 }} {{- end }} {{- end }} volumes: diff --git a/helm/charts/kratos/templates/job-migration.yaml b/helm/charts/kratos/templates/job-migration.yaml index 1ef7702d7e..66b081b9df 100644 --- a/helm/charts/kratos/templates/job-migration.yaml +++ b/helm/charts/kratos/templates/job-migration.yaml @@ -46,7 +46,7 @@ spec: restartPolicy: Never {{- if .Values.deployment.extraInitContainers }} initContainers: -{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }} +{{ tpl .Values.deployment.extraInitContainers . | indent 8 }} {{- end }} {{- if .Values.deployment.extraVolumes }} volumes: diff --git a/helm/charts/kratos/templates/statefulset-mail.yaml b/helm/charts/kratos/templates/statefulset-mail.yaml index fbf799db85..98e86684a2 100644 --- a/helm/charts/kratos/templates/statefulset-mail.yaml +++ b/helm/charts/kratos/templates/statefulset-mail.yaml @@ -70,7 +70,7 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} {{- if .Values.deployment.extraInitContainers }} initContainers: -{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }} +{{ tpl .Values.deployment.extraInitContainers . | indent 8 }} {{- end }} volumes: - name: {{ include "kratos.fullname" . }}-config-volume