apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres
spec:
  selector:
    matchLabels:
      app: postgres

  replicas: 1

  template:
    metadata:
      labels:
        app: postgres

    spec:
      containers:
      - name: postgres
        image: postgres:12
        resources:
          limits:
            memory: 128Mi
            cpu: 500m
        ports:
        - containerPort: 5432        
        env:
        - name: POSTGRES_PASSWORD
          value: airflow
        - name: POSTGRES_USER
          value: airflow
        - name: POSTGRES_DB
          value: airflow