apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: db
spec:
  replicas: 1
  selector:
    matchLabels:
      service: db
  serviceName: db
  template:
    metadata:
      labels:
        service: db
    spec:
      containers:
      - env:
        - name: POSTGRES_PASSWORD
          value: postgres
        # image: postgres@sha256:05580d6c8f7bb0566793c7c45ab276458c53c9c31300c046ba6fcbc66598c7b9
        image: registry.formuladb.io/formuladb/febe/dbplv8:12.3-2.3.13
        name: db
        ports:
        - containerPort: 5432
        resources: {}
        volumeMounts:
        - mountPath: /var/lib/postgresql/data
          name: pg-persistence
          subPath: postgres
      restartPolicy: Always
      imagePullSecrets:
        - name: regcred