diff --git a/charts/questdb/templates/statefulset.yaml b/charts/questdb/templates/statefulset.yaml index aa4f07d..d0f1d50 100644 --- a/charts/questdb/templates/statefulset.yaml +++ b/charts/questdb/templates/statefulset.yaml @@ -101,13 +101,17 @@ spec: {{- end }} initContainers: - name: init-db-migration - image: debian:bookworm-slim + image: "{{ .Values.dataMigration.image }}" command: ["bash", "/mnt/migration_scripts/migrate_to_helm_v1.sh"] volumeMounts: - name: {{ include "questdb.fullname" . }} 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