From 3ddd097bb5565c4f1511c38d70062464fbeb0a32 Mon Sep 17 00:00:00 2001 From: Echoz Date: Thu, 9 May 2024 17:45:10 +0200 Subject: [PATCH] feat: make migration command configurable through values (#24) --- templates/migration/job.yaml | 3 +-- values.yaml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/migration/job.yaml b/templates/migration/job.yaml index 85a460e..3100e60 100644 --- a/templates/migration/job.yaml +++ b/templates/migration/job.yaml @@ -57,8 +57,7 @@ spec: {{- end }} image: "{{ .Values.migration.image.repository }}:{{ .Values.migration.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.migration.image.pullPolicy }} - command: [prisma] - args: [db, push, --skip-generate, --schema, /app/schema.prisma] + command: {{ .Values.migration.command | toYaml | nindent 12 }} {{- if .Values.migration.envFrom }} envFrom: {{- toYaml .Values.migration.envFrom | nindent 12 }} diff --git a/values.yaml b/values.yaml index 0ab2a90..e6d77d2 100644 --- a/values.yaml +++ b/values.yaml @@ -803,6 +803,7 @@ migration: pullPolicy: IfNotPresent tag: "" restartPolicy: Never + command: [prisma, db, push, --skip-generate, --schema, /app/schema.prisma] env: [] envFrom: [] jobAnnotations: {}