---
# Source: airflow/templates/deployments-flower.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: airflow-flower
  labels:
    app: airflow
    component: flower
    chart: airflow-5.2.0
    release: airflow
    heritage: Tiller
spec:
  replicas: 1
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app: airflow
      component: flower
      release: airflow
  template:
    metadata:
      annotations:
        checksum/config-env: 4ee020624b4c4e6c7e5b7a1e9161839eaeb06c462968cd4c3e1066cdef5eaeca
      labels:
        app: airflow
        component: flower
        release: airflow
    spec:
      restartPolicy: Always
      containers:
        - name: airflow-flower
          image: puckel/docker-airflow:1.10.4
          imagePullPolicy: IfNotPresent
          envFrom:
            - configMapRef:
                name: "airflow-env"
          env:          
            - name: POSTGRES_USER
              value: "postgres"
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: airflow-postgresql
                  key: postgres-password
            - name: REDIS_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: airflow-redis
                  key: redis-password
          ports:
            - name: flower
              containerPort: 5555
              protocol: TCP
          args: ["flower"]
          livenessProbe:
            httpGet:
              path: "//"
              port: flower
            initialDelaySeconds: 60
            periodSeconds: 60
            timeoutSeconds: 1
            successThreshold: 1
            failureThreshold: 5
          resources:
            {}
            
