apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: ba-postgres
  name: ba-postgres
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: ba-postgres
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.service: ba-postgres
    spec:
      containers:
      - env:
        - name: POSTGRES_DB
          value: ba-db
        - name: POSTGRES_PASSWORD
          value: "1234"
        - name: POSTGRES_USER
          value: ba-user
        image: postgres:11
        imagePullPolicy: Always
        name: ba-postgres
        ports:
        - containerPort: 5432
        resources: {}
        volumeMounts:
        - mountPath: /var/lib/postgresql/data
          name: ba-postgres-volume
      restartPolicy: Always
      serviceAccountName: ""
      volumes:
      - name: ba-postgres-volume
        persistentVolumeClaim:
          claimName: ba-postgres-volume
status: {}
