streetmapp commented on a change in pull request #8777:
URL: https://github.com/apache/airflow/pull/8777#discussion_r441771376



##########
File path: chart/templates/configmap.yaml
##########
@@ -0,0 +1,117 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+################################
+## Airflow ConfigMap
+#################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "airflow_config" . }}
+  labels:
+    tier: airflow
+    component: config
+    release: {{ .Release.Name }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+{{- with .Values.labels }}
+{{ toYaml . | indent 4 }}
+{{- end }}
+data:
+  # These are system-specified config overrides.
+  airflow.cfg: |
+    [core]
+    load_examples = False
+    colored_console_log = False
+    executor = {{ .Values.executor }}
+{{- if .Values.elasticsearch.enabled }}
+    remote_logging = True
+{{- end }}
+
+    [webserver]
+    enable_proxy_fix = True
+    expose_config = True
+    rbac = True
+
+{{- if eq .Values.executor "CeleryExecutor" }}
+    [celery]
+    default_queue = celery
+{{- end }}
+
+    [scheduler]
+    scheduler_heartbeat_sec = 5
+{{- if .Values.statsd.enabled }}
+    statsd_on = True
+    statsd_port = 9125
+    statsd_prefix = airflow
+    statsd_host = {{ printf "%s-statsd" .Release.Name }}
+{{- end }}
+    # Restart Scheduler every 41460 seconds (11 hours 31 minutes)
+    # The odd time is chosen so it is not always restarting on the same "hour" 
boundary
+    run_duration = 41460
+
+{{- if .Values.elasticsearch.enabled }}
+    [elasticsearch]
+    # The elasticsearch variables were updated to the shorter names in v1.10.4
+    write_stdout = True
+    json_format = True
+    log_id_template = {dag_id}_{task_id}_{execution_date}_{try_number}
+
+    [elasticsearch_configs]
+    max_retries = 3
+    timeout = 30
+    retry_timeout = True
+{{- end }}
+
+{{- if eq .Values.executor "KubernetesExecutor" }}
+    [kubernetes]
+    namespace = {{ .Release.Namespace }}
+    airflow_configmap = {{ include "airflow_config" . }}
+    airflow_local_settings_configmap = {{ include "airflow_config" . }}
+    worker_container_repository = {{ .Values.images.airflow.repository }}
+    worker_container_tag = {{ .Values.images.airflow.tag }}
+    worker_container_image_pull_policy = {{ .Values.images.airflow.pullPolicy 
}}
+    worker_service_account_name = {{ .Release.Name }}-worker-serviceaccount
+    image_pull_secrets = {{ template "registry_secret" . }}
+    dags_in_image = True
+    delete_worker_pods = True
+

Review comment:
       What does the `AIRFLOW__KUBERNETES_ENVIRONMENT_VARIABLES__*` do in this 
instance? Because in the case of setting `airflow_configmap` the environment 
variable for that setting is just `AIRFLOW__KUBERNETES__AIRFLOW_CONFIGMAP`. So 
why the need for the extra environment variable?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to