# Written by Mutlu Polatcan
# 17.12.2019
# --------------------------
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres
  labels:
    app: airflow
    unit: database
spec:
  replicas: 1
  selector:
    matchLabels:
      app: airflow
      unit: database
  template:
    metadata:
      name: postgres
      labels:
        app: airflow
        unit: database
    spec:
      hostname: postgres
      containers:
        - name: postgres
          image: postgres
          imagePullPolicy: Always
          envFrom:
            - configMapRef:
                name: postgres
          ports:
            - containerPort: 5432
      restartPolicy: Always