From 0ab45f95516aacaffc0f635a6c2fc04e124305ad Mon Sep 17 00:00:00 2001 From: Ioan Damian Date: Thu, 21 Jan 2021 22:05:04 +0200 Subject: [PATCH] change env section from list to map to be able to pass arguments in terraform helm-release --- charts/mobile-api/templates/deployment.yaml | 5 ++++- charts/mobile-api/values.yaml | 2 +- charts/routing/templates/deployment.yaml | 5 ++++- charts/routing/values.yaml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/charts/mobile-api/templates/deployment.yaml b/charts/mobile-api/templates/deployment.yaml index 24f6705..246cf11 100644 --- a/charts/mobile-api/templates/deployment.yaml +++ b/charts/mobile-api/templates/deployment.yaml @@ -35,7 +35,10 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.env }} env: - {{- toYaml .Values.env | nindent 12}} + {{ range $k, $v := .Values.env }} + - name: {{ $k | quote }} + value: {{ $v | quote }} + {{- end }} {{- end }} ports: - name: http diff --git a/charts/mobile-api/values.yaml b/charts/mobile-api/values.yaml index 1957ac0..fd6ca48 100644 --- a/charts/mobile-api/values.yaml +++ b/charts/mobile-api/values.yaml @@ -36,7 +36,7 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 -env: [] +env: {} service: type: ClusterIP diff --git a/charts/routing/templates/deployment.yaml b/charts/routing/templates/deployment.yaml index b648f4e..5eb54f1 100644 --- a/charts/routing/templates/deployment.yaml +++ b/charts/routing/templates/deployment.yaml @@ -35,7 +35,10 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} {{- if .Values.env }} env: - {{- toYaml .Values.env | nindent 12}} + {{ range $k, $v := .Values.env }} + - name: {{ $k | quote }} + value: {{ $v | quote }} + {{- end }} {{- end }} ports: - name: http diff --git a/charts/routing/values.yaml b/charts/routing/values.yaml index 98db943..a0ccd29 100644 --- a/charts/routing/values.yaml +++ b/charts/routing/values.yaml @@ -36,7 +36,7 @@ securityContext: {} # runAsNonRoot: true # runAsUser: 1000 -env: [] +env: {} service: type: ClusterIP