# Written by Mutlu Polatcan
# 17.12.2019
# --------------------------
apiVersion: apps/v1
kind: Deployment
metadata:
  name: celery-flower
  labels:
    app: airflow
    unit: flower
spec:
  selector:
    matchLabels:
      app: airflow
      unit: flower
  template:
    metadata:
      name: celery-flower
      labels:
        app: airflow
        unit: flower
    spec:
      restartPolicy: Always
      containers:
        - name: celery-flower
          image: mpolatcan/airflow:1.10.6-python3.6
          imagePullPolicy: Always
          env:
            - name: AIRFLOW_DAEMONS
              value: |
                flower
          envFrom:
            - configMapRef:
                name: airflow-config
            - secretRef:
                name: airflow-secret
          ports:
            - containerPort: 5555 # Celery Flower UI port