From 146d094d8cfac81841bf51f90c9c56404096f2ca Mon Sep 17 00:00:00 2001 From: Mark Eschbach Date: Thu, 2 Jul 2026 10:27:28 -0700 Subject: [PATCH] deploy/helm: ability to inject init containers before migrator --- deploy/pgcqrs/templates/deployment.yaml | 3 +++ deploy/pgcqrs/values.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/deploy/pgcqrs/templates/deployment.yaml b/deploy/pgcqrs/templates/deployment.yaml index 8c00576..f990ef9 100644 --- a/deploy/pgcqrs/templates/deployment.yaml +++ b/deploy/pgcqrs/templates/deployment.yaml @@ -28,6 +28,9 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: + {{- with .Values.extraInitContainers }} + {{- toYaml . | nindent 8 }} + {{- end }} - name: migrator image: "{{ .Values.image.repository }}-migrator:{{ .Values.image.tag | default .Chart.AppVersion }}" {{- with .Values.env }} diff --git a/deploy/pgcqrs/values.yaml b/deploy/pgcqrs/values.yaml index 06a2d01..ed186b6 100644 --- a/deploy/pgcqrs/values.yaml +++ b/deploy/pgcqrs/values.yaml @@ -80,3 +80,8 @@ nodeSelector: {} tolerations: [] affinity: {} + +extraInitContainers: [] + # - name: init-db + # image: busybox:1.28 + # command: ['sh', '-c', 'echo "do something before migrator"']