apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: resourcetracking-db-statefulset
spec:
  serviceName: resourcetracking-db-uat
  selector:
    matchLabels:
      workloadselector: resourcetracking-db-uat
  template:
    metadata:
      labels:
        workloadselector: resourcetracking-db-uat
    spec:
      containers:
      - name: resourcetracking-db
        env:
        - name: POSTGRES_PASSWORD
          valueFrom:
            secretKeyRef:
              name: resourcetracking-env-uat
              key: POSTGRES_PASSWORD
        - name: POSTGRES_DB
          value: resourcetracking_uat
