From f0df9c5b42c1427f48a42ac892bed30878a1b8b0 Mon Sep 17 00:00:00 2001 From: Steven Sklar Date: Tue, 25 Mar 2025 10:34:15 -0400 Subject: [PATCH 1/2] Data migration templating fixes --- charts/questdb/templates/statefulset.yaml | 6 +++++- charts/questdb/values.yaml | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/questdb/templates/statefulset.yaml b/charts/questdb/templates/statefulset.yaml index aa4f07d..c481878 100644 --- a/charts/questdb/templates/statefulset.yaml +++ b/charts/questdb/templates/statefulset.yaml @@ -100,7 +100,7 @@ spec: {{- toYaml .Values.sidecars | nindent 8 }} {{- end }} initContainers: - - name: init-db-migration + - name: "{{ .Values.dataMigration.image }}" image: debian:bookworm-slim command: ["bash", "/mnt/migration_scripts/migrate_to_helm_v1.sh"] volumeMounts: @@ -108,6 +108,10 @@ spec: mountPath: /mnt/questdb - name: migration-scripts mountPath: /mnt/migration_scripts + {{- if .Values.dataMigration.resources }} + resources: + {{- toYaml .Values.dataMigration.resources | nindent 12}} + {{- end }} {{- if .Values.initContainers }} {{- toYaml .Values.initContainers | nindent 6 }} {{- end }} diff --git a/charts/questdb/values.yaml b/charts/questdb/values.yaml index 960c1d4..0c74245 100644 --- a/charts/questdb/values.yaml +++ b/charts/questdb/values.yaml @@ -111,3 +111,11 @@ serviceAccount: # if create is set to "true", you can specify the name of that service account below # if create is set to "false", you can use this to reference an existing service account for the StatefulSet pod # name: custom-service-account-name + +dataMigration: + image: "debian:bookworm-slim" + resources: + requests: + memory: "256Mi" + limits: + memory: "1Gi" \ No newline at end of file From aefe1f4423636812b3fd83f2bdc9f728461cd365 Mon Sep 17 00:00:00 2001 From: Steven Sklar Date: Tue, 25 Mar 2025 11:05:04 -0400 Subject: [PATCH 2/2] fix --- charts/questdb/templates/statefulset.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/questdb/templates/statefulset.yaml b/charts/questdb/templates/statefulset.yaml index c481878..d0f1d50 100644 --- a/charts/questdb/templates/statefulset.yaml +++ b/charts/questdb/templates/statefulset.yaml @@ -100,8 +100,8 @@ spec: {{- toYaml .Values.sidecars | nindent 8 }} {{- end }} initContainers: - - name: "{{ .Values.dataMigration.image }}" - image: debian:bookworm-slim + - name: init-db-migration + image: "{{ .Values.dataMigration.image }}" command: ["bash", "/mnt/migration_scripts/migrate_to_helm_v1.sh"] volumeMounts: - name: {{ include "questdb.fullname" . }}