apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: pg
  name: pg
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: pg
  strategy: {}
  template:
    metadata:
      labels:
        io.kompose.service: pg
    spec:
      containers:
        - env:
            - name: POSTGRES_PASSWORD
              value: secret
            - name: POSTGRES_USER
              value: miniflux
          image: postgres:latest
          imagePullPolicy: IfNotPresent
          name: pg
          ports:
            - containerPort: 5432
          resources:
            limits:
              cpu: "0.1"
              memory: "500Mi"
          volumeMounts:
            - mountPath: /var/lib/postgresql/data
              name: pg-pvc
              # for pg, the mount point can not be a mount point root
              subPath: pg-data
      restartPolicy: Always
      volumes:
        - name: pg-pvc
          persistentVolumeClaim:
            claimName: pg-pvc
      serviceAccountName: ""

status: {}
