configmap.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. ################################
  18. ## Airflow ConfigMap
  19. #################################
  20. apiVersion: v1
  21. kind: ConfigMap
  22. metadata:
  23. name: {{ template "airflow_config" . }}
  24. labels:
  25. tier: airflow
  26. component: config
  27. release: {{ .Release.Name }}
  28. chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
  29. heritage: {{ .Release.Service }}
  30. {{- with .Values.labels }}
  31. {{ toYaml . | indent 4 }}
  32. {{- end -}}
  33. {{- if .Values.airflowConfigAnnotations }}
  34. annotations:
  35. {{- toYaml .Values.airflowConfigAnnotations | nindent 4 }}
  36. {{- end }}
  37. {{- $Global := . }}
  38. data:
  39. # These are system-specified config overrides.
  40. airflow.cfg: |-
  41. {{- range $section, $settings := .Values.config }}
  42. [{{ $section }}]
  43. {{- range $key, $val := $settings }}
  44. {{ $key }} = {{ tpl ($val | toString) $Global }}
  45. {{- end }}
  46. {{ end }}
  47. {{- if .Values.airflowLocalSettings }}
  48. airflow_local_settings.py: |
  49. {{ tpl .Values.airflowLocalSettings . | nindent 4 }}
  50. {{- end }}
  51. {{- if and .Values.dags.gitSync.enabled .Values.dags.gitSync.knownHosts }}
  52. known_hosts: |
  53. {{ .Values.dags.gitSync.knownHosts | nindent 4 }}
  54. {{- end }}
  55. {{- if or (eq $.Values.executor "LocalKubernetesExecutor") (eq $.Values.executor "KubernetesExecutor") (eq $.Values.executor "CeleryKubernetesExecutor") }}
  56. {{- if semverCompare ">=1.10.12" .Values.airflowVersion }}
  57. pod_template_file.yaml: |-
  58. {{- if .Values.podTemplate }}
  59. {{ tpl .Values.podTemplate . | nindent 4 }}
  60. {{- else }}
  61. {{ tpl (.Files.Get "files/pod-template-file.kubernetes-helm-yaml") . | nindent 4 }}
  62. {{- end }}
  63. {{- end }}
  64. {{- end }}
  65. {{- if .Values.kerberos.enabled }}
  66. krb5.conf: |
  67. {{ tpl .Values.kerberos.config . | nindent 4 }}
  68. {{- end }}