apiVersion: v1
kind: Pod
metadata:
  name: airflow-db-init
  labels:
    purpose: airflow-db-init
spec:
  containers:
  - name: airflow-db-init
    image: apache/airflow:2.0.1
    command: ["airflow"]
    args: ["db", "init"]
    env:
    - name: AIRFLOW__CORE__EXECUTOR
      value: "LocalExecutor"
    - name: AIRFLOW__CORE__SQL_ALCHEMY_CONN
      value: "postgresql+psycopg2://postgres:postgres@postgres-service:5432/airflow"
    - name: AIRFLOW__CORE__FERNET_KEY
      value: "FB0o_zt4e3Ziq3LdUUO7F2Z95cvFFx16hU8jTeR1ASM="
    - name: AIRFLOW__CORE__LOAD_EXAMPLES
      value: "False"
    - name: AIRFLOW__CORE__LOGGING_LEVEL
      value: "INFO"
  restartPolicy: OnFailure
