diff --git a/infrastructure/helm-chart/charts/tools/Chart.yaml b/infrastructure/helm-chart/charts/tools/Chart.yaml index 35381f023..355c3888a 100644 --- a/infrastructure/helm-chart/charts/tools/Chart.yaml +++ b/infrastructure/helm-chart/charts/tools/Chart.yaml @@ -7,4 +7,8 @@ dependencies: - name: akhq condition: akhq.enabled - name: kafka-connect - condition: kafka-connect.enabled \ No newline at end of file + condition: kafka-connect.enabled + - name: postgresql + condition: postgresql.enabled + - name: redis + condition: redis.enabled \ No newline at end of file diff --git a/infrastructure/helm-chart/charts/tools/charts/postgresql/templates/statefulset.yaml b/infrastructure/helm-chart/charts/tools/charts/postgresql/templates/statefulset.yaml index 75ceafab6..c8532d058 100644 --- a/infrastructure/helm-chart/charts/tools/charts/postgresql/templates/statefulset.yaml +++ b/infrastructure/helm-chart/charts/tools/charts/postgresql/templates/statefulset.yaml @@ -16,6 +16,18 @@ spec: app: {{ .Values.name }} spec: terminationGracePeriodSeconds: 10 + initContainers: + - command: + - sh + - -c + - rmdir /var/lib/postgresql/data/lost+found + image: ghcr.io/airyhq/infrastructure/busybox:latest + imagePullPolicy: IfNotPresent + name: fix-new-directory + resources: {} + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: {{ .Values.name }}-data containers: - name: {{ .Values.name }} image: {{ .Values.image }}:{{ .Values.version }} @@ -38,6 +50,9 @@ spec: successThreshold: 1 failureThreshold: 5 resources: {{ .Values.resources }} + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: {{ .Values.name }}-data volumeClaimTemplates: - metadata: name: {{ .Values.name }}-data diff --git a/infrastructure/helm-chart/charts/tools/charts/postgresql/values.yaml b/infrastructure/helm-chart/charts/tools/charts/postgresql/values.yaml index 8f203dfb6..cdadf02ce 100644 --- a/infrastructure/helm-chart/charts/tools/charts/postgresql/values.yaml +++ b/infrastructure/helm-chart/charts/tools/charts/postgresql/values.yaml @@ -1,6 +1,6 @@ name: postgresql mandatory: false -enabled: true +enabled: false image: postgres version: 15.1 port: 5432 diff --git a/infrastructure/helm-chart/charts/tools/charts/redis/values.yaml b/infrastructure/helm-chart/charts/tools/charts/redis/values.yaml index 3de627743..21f389ee2 100644 --- a/infrastructure/helm-chart/charts/tools/charts/redis/values.yaml +++ b/infrastructure/helm-chart/charts/tools/charts/redis/values.yaml @@ -1,3 +1,4 @@ +enabled: false version: 7.0.8 port: 6379 storage: "5Gi"