apiVersion: v1
kind: ConfigMap
metadata:
  name: airflow-configmap
  namespace: airflow-tls
data:
  # Reference: https://github.com/apache/airflow/tree/1.10.12/airflow/config_templates
  airflow.cfg: |
    [core]
    logging_level = INFO
    executor = KubernetesExecutor
    fernet_key = kLtLiPlyj8qyGolY_FB2CiRu1oNyX_ullQ2Q9KYb3wc=
    load_examples = True
    sql_alchemy_conn = postgresql+psycopg2://sa:pwd@airflow-postgres-service/airflow
    # store_serialized_dags = True
    # store_dag_code = True
    # min_serialized_dag_fetch_interval = 30
    plugins_folder = /opt/airflow/plugins

    [webserver]
    dag_default_view = graph
    rbac = False
    authenticate = False
    
    [smtp]
    smtp_host = airflow-smtp-svc
    smtp_starttls = False
    smtp_mail_from = airflow@smtp.rikguz.com
    
    [celery]
    broker_url = 
    result_backend = 

    [kubernetes]
    airflow_configmap = airflow-configmap
    in_cluster = True
    # cluster_context = airflow-tls
    worker_service_account_name = airflow-rbac
    worker_container_repository = rkoH1pVL.azurecr.io/airflow
    worker_container_tag = 1.10.12
    delete_worker_pods = True
    delete_worker_pods_on_failure = False
    namespace = airflow-tls
    dags_volume_claim = azure-claim-dags
    dags_volume_mount_point = /opt/airflow/dags
    # dags_volume_subpath =
    logs_volume_claim = azure-claim-logs
    logs_volume_subpath = logs
