apiVersion: apps/v1 kind: Deployment metadata: name: postgres spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: postgres template: metadata: labels: app: postgres spec: containers: - name: postgres image: ghcr.io/chrislovering/psql_extended:15 imagePullPolicy: "Always" ports: - name: postgres containerPort: 5432 envFrom: - secretRef: name: postgres-env args: ["-c", "config_file=/etc/postgresql/postgresql.conf"] volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data subPath: pgdata - name: postgres-config mountPath: /etc/postgresql - name: dshm mountPath: /dev/shm volumes: - name: postgres-data persistentVolumeClaim: claimName: postgres-storage - name: postgres-config configMap: name: postgres-config - name: dshm emptyDir: medium: Memory sizeLimit: 2Gi