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