From 9a3256366e7ccb78008d23bc11a16180b3373ddd Mon Sep 17 00:00:00 2001 From: Ivan Zubenko Date: Thu, 10 Feb 2022 15:42:39 +0200 Subject: [PATCH] fix postgres-db-init --- charts/postgres-db-init/Chart.yaml | 4 ++-- charts/postgres-db-init/templates/job.yaml | 28 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/charts/postgres-db-init/Chart.yaml b/charts/postgres-db-init/Chart.yaml index 4078f9f..92e26d1 100644 --- a/charts/postgres-db-init/Chart.yaml +++ b/charts/postgres-db-init/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -version: 1.2.11 -appVersion: 1.2.11 +version: 1.2.12 +appVersion: 1.2.12 name: postgres-db-init description: PostgreSQL DB initialization dependencies: diff --git a/charts/postgres-db-init/templates/job.yaml b/charts/postgres-db-init/templates/job.yaml index 41baa1a..ab75ce0 100644 --- a/charts/postgres-db-init/templates/job.yaml +++ b/charts/postgres-db-init/templates/job.yaml @@ -28,19 +28,6 @@ spec: volumeMounts: - name: postgres-db-init mountPath: /var/lib/postgres_db_init - {{- with .Values.env }} - env: {{ toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.migrations.enabled }} - containers: - - name: run-migrations - image: {{ .Values.migrations.image.repository }}:{{ .Values.migrations.image.tag }} - {{- with .Values.migrations.command }} - command: {{ toYaml . | nindent 12 }} - {{- end }} - {{- with .Values.migrations.args }} - args: {{ toYaml . | nindent 12 }} - {{- end }} env: {{- with .Values.adminDsn }} - name: NP_ADMIN_DSN @@ -54,9 +41,22 @@ spec: - name: NP_SERVICE_DSN {{ toYaml . | indent 14 }} {{- end }} - {{- with .Values.migrations.env }} + {{- with .Values.env }} {{ toYaml . | indent 12 }} {{- end }} + {{- if .Values.migrations.enabled }} + containers: + - name: run-migrations + image: {{ .Values.migrations.image.repository }}:{{ .Values.migrations.image.tag }} + {{- with .Values.migrations.command }} + command: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.migrations.args }} + args: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.migrations.env }} + env: {{ toYaml . | nindent 12 }} + {{- end }} {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{ toYaml . | nindent 8 }}