---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: pg
  namespace: confluent
spec:
  selector:
    matchLabels:
      app: pg
  serviceName: "pg"
  replicas: 1 # by default is 1
  # minReadySeconds: 10 # by default is 0
  template:
    metadata:
      labels:
        app: pg
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - name: pg
        image: debezium/postgres:10
        env:
        - name: POSTGRES_USER
          value: myuser
        - name: POSTGRES_PASSWORD
          value: mypassword
        - name: POSTGRES_DB
          value: postgres