apiVersion: v1
data:
  airflow.cfg: |-
    [api]
    auth_backend = airflow.api.auth.backend.deny_all

    [celery]
    worker_concurrency = 16

    [celery_kubernetes_executor]
    kubernetes_queue = kubernetes

    [core]
    colored_console_log = False
    dags_folder = /opt/airflow/dags
    executor = CeleryExecutor
    load_examples = False
    remote_logging = False

    [elasticsearch]
    json_format = True
    log_id_template = {dag_id}_{task_id}_{execution_date}_{try_number}

    [elasticsearch_configs]
    max_retries = 3
    retry_timeout = True
    timeout = 30

    [kerberos]
    ccache = /var/kerberos-ccache/cache
    keytab = /etc/airflow.keytab
    principal = airflow@FOO.COM
    reinit_frequency = 3600

    [kubernetes]
    airflow_configmap = RELEASE-NAME-airflow-config
    airflow_local_settings_configmap = RELEASE-NAME-airflow-config
    multi_namespace_mode = False
    namespace = default
    pod_template_file = /opt/airflow/pod_templates/pod_template_file.yaml
    worker_container_repository = apache/airflow
    worker_container_tag = 2.2.3

    [logging]
    colored_console_log = False
    remote_logging = False

    [metrics]
    statsd_host = RELEASE-NAME-statsd
    statsd_on = True
    statsd_port = 9125
    statsd_prefix = airflow

    [scheduler]
    run_duration = 41460
    statsd_host = RELEASE-NAME-statsd
    statsd_on = True
    statsd_port = 9125
    statsd_prefix = airflow

    [webserver]
    enable_proxy_fix = True
    rbac = True
  airflow_local_settings.py: |2


    from airflow.www.utils import UIAlert

    DASHBOARD_UIALERTS = [
      UIAlert(
        'Usage of a dynamic webserver secret key detected. We recommend a static webserver secret key instead.'
        ' See the <a href='
        '"https://airflow.apache.org/docs/helm-chart/stable/production-guide.html#webserver-secret-key">'
        'Helm Chart Production Guide</a> for more details.',
        category="warning",
        roles=["Admin"],
        html=True,
      )
    ]
kind: ConfigMap
metadata:
  labels:
    chart: airflow-1.4.0
    component: config
    heritage: Helm
    release: RELEASE-NAME
    tier: airflow
  name: RELEASE-NAME-airflow-config
