diff --git a/library/ix-dev/community/immich/templates/_persistence.tpl b/library/ix-dev/community/immich/templates/_persistence.tpl index 39e198fa404..ccfb7048892 100644 --- a/library/ix-dev/community/immich/templates/_persistence.tpl +++ b/library/ix-dev/community/immich/templates/_persistence.tpl @@ -117,34 +117,8 @@ persistence: mountPath: /tmp {{/* Database */}} - postgresdata: - enabled: true - type: {{ .Values.immichStorage.pgData.type }} - datasetName: {{ .Values.immichStorage.pgData.datasetName | default "" }} - hostPath: {{ .Values.immichStorage.pgData.hostPath | default "" }} - targetSelector: - # Postgres pod - postgres: - # Postgres container - postgres: - mountPath: /var/lib/postgresql/data - # Postgres - Permissions container - # Different than the 01-permissions - permissions: - mountPath: /mnt/directories/postgres_data - postgresbackup: - enabled: true - type: {{ .Values.immichStorage.pgBackup.type }} - datasetName: {{ .Values.immichStorage.pgBackup.datasetName | default "" }} - hostPath: {{ .Values.immichStorage.pgBackup.hostPath | default "" }} - targetSelector: - # Postgres backup pod - postgresbackup: - # Postgres backup container - postgresbackup: - mountPath: /postgres_backup - # Postgres - Permissions container - # Different than the 01-permissions - permissions: - mountPath: /mnt/directories/postgres_backup + {{- include "ix.v1.common.app.postgresPersistence" + (dict "pgData" .Values.immichStorage.pgData + "pgBackup" .Values.immichStorage.pgBackup + ) | nindent 2 }} {{- end -}} diff --git a/library/ix-dev/community/immich/templates/_service.tpl b/library/ix-dev/community/immich/templates/_service.tpl index 5c8333143f6..bc1f83a5cfc 100644 --- a/library/ix-dev/community/immich/templates/_service.tpl +++ b/library/ix-dev/community/immich/templates/_service.tpl @@ -91,15 +91,6 @@ service: targetPort: 6379 targetSelector: redis - postgres: - enabled: true - type: ClusterIP - targetSelector: postgres - ports: - postgres: - enabled: true - primary: true - port: 5432 - targetPort: 5432 - targetSelector: postgres + {{- include "ix.v1.common.app.postgresService" $ | nindent 2 }} + {{- end -}}