apiVersion: apps/v1
kind: Deployment
metadata:
name: airflow
namespace: airflow-k8spodoperator
spec:
replicas: 1
selector:
matchLabels:
name: airflow
template:
metadata:
labels:
name: airflow
spec:
automountServiceAccountToken: true
containers:
- args:
- webserver
- -p
- "8000"
env:
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
value: postgresql:
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
image: apache/airflow:1.10.12
imagePullPolicy: Always
volumeMounts:
- mountPath: /opt/airflow/logs/
mountPropagation: None
name: airflow-logs
- args:
- scheduler
env:
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
value: postgresql:
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
image: eu.gcr.io/fullstaq-st-tim/st-airflow:latest
imagePullPolicy: Always
name: airflow-scheduler
volumeMounts:
- mountPath: /opt/airflow/logs/
mountPropagation: None
name: airflow-logs
initContainers:
- args:
- initdb
env:
- name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
value: postgresql:
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
image: apache/airflow:1.10.12
imagePullPolicy: Always