Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: postgres-stateful
- labels:
- app: postgres
- spec:
- serviceName: "postgres"
- replicas: 1
- selector:
- matchLabels:
- app: postgres
- template:
- metadata:
- labels:
- app: postgres
- spec:
- containers:
- - name: postgres
- image: docker-dev-local.dev.dvz-mv.net/ina/postgresql:14.1-scm-debian-bullseye-build-74-4
- envFrom:
- - configMapRef:
- name: postgres-configuration
- ports:
- - containerPort: 5432
- name: postgresdb
- volumeMounts:
- - name: pv-data
- mountPath: /opt/db/data/postgres/data # /var/lib/postgresql/data
- - name: pv-backup
- mountPath: /opt/db/backup/postgres
- - name: pv-arch
- mountPath: /opt/db/backup/postgres/arch
- securityContext:
- runAsUser: 1000 # UID of postgres user
- runAsGroup: 1000
- fsGroup: 1000
- volumes:
- - name: pv-data
- persistentVolumeClaim:
- claimName: pgdata33-pvc
- - name: pv-backup
- persistentVolumeClaim:
- claimName: pgbackup33-pvc
- - name: pv-arch
- persistentVolumeClaim:
- claimName: pgarch33-pvc
Add Comment
Please, Sign In to add comment