apiVersion: apps/v1 kind: Deployment metadata: labels: k8s-app: postgres name: postgres namespace: matrix spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: k8s-app: postgres strategy: type: Recreate template: metadata: creationTimestamp: null labels: k8s-app: postgres name: postgres spec: containers: - env: - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: key: pgpass name: postgres-password - name: POSTGRES_USER value: matrix - name: PGDATA value: /var/lib/postgresql/data/pgdata image: postgres:13 imagePullPolicy: Always name: postgres securityContext: privileged: false terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - mountPath: /var/lib/postgresql/data name: postgresdata dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler terminationGracePeriodSeconds: 30 volumes: - name: postgresdata persistentVolumeClaim: claimName: postgres-storage