tpanza commented on issue #61268:
URL: https://github.com/apache/airflow/issues/61268#issuecomment-3837513573
Here are the patches I had to apply to the RC2 chart template source, before
it would render with my custom values overrides:
(1) `chart/templates/api-server/api-server-service.yaml`: Emit valid YAML by
ensuring that the dash is on the same line as the mapping:
```diff
@@ -42,15 +42,13 @@
selector:
tier: airflow
component: api-server
release: {{ .Release.Name }}
ports:
- {{ range .Values.apiServer.service.ports }}
- -
- {{- range $key, $val := . }}
- {{ $key }}: {{ tpl (toString $val) $ }}
- {{- end }}
+ {{- range .Values.apiServer.service.ports }}
+ - name: {{ .name }}
+ port: {{ tpl (toString .port) $ | int }}
{{- end }}
{{- if .Values.apiServer.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.apiServer.service.loadBalancerIP }}
{{- end }}
{{- if .Values.apiServer.service.loadBalancerSourceRanges }}
```
(2) `chart/templates/configmaps/configmap.yaml`: avoid Unquoted config
values:
```diff
@@ -52,11 +52,11 @@
# These are system-specified config overrides.
airflow.cfg: |-
{{- range $section, $settings := $config }}
[{{ $section }}]
{{- range $key, $val := $settings }}
- {{ $key }} = {{ tpl ($val | toString) $Global }}
+ {{ $key }} = {{ tpl ($val | toString) $Global | squote }}
{{- end }}
{{ end }}
{{- if .Values.airflowLocalSettings }}
airflow_local_settings.py: |-
```
(3) `chart/templates/_helpers.yaml`: insert list elements at right level;
use proper boolean casing:
```diff
@@ -343,11 +343,13 @@
readOnly: true
subPath: known_hosts
{{- end }}
{{- end }}
{{- if .Values.dags.gitSync.extraVolumeMounts }}
- {{- tpl (toYaml .Values.dags.gitSync.extraVolumeMounts) . | nindent 2 }}
+ {{- range .Values.dags.gitSync.extraVolumeMounts }}
+ - {{ tpl (toYaml .) $ | nindent 4 | trim }}
+ {{- end }}
{{- end }}
{{- if and .Values.dags.gitSync.containerLifecycleHooks (not .is_init) }}
lifecycle: {{- tpl (toYaml .Values.dags.gitSync.containerLifecycleHooks)
. | nindent 4 }}
{{- end }}
{{- end }}
@@ -598,11 +600,11 @@
mountPath: {{ printf "%s/dags" .Values.airflowHome }}
{{- end }}
{{- if .Values.dags.persistence.subPath }}
subPath: {{ .Values.dags.persistence.subPath }}
{{- end }}
- readOnly: {{ .Values.dags.gitSync.enabled | ternary "True" "False" }}
+ readOnly: {{ .Values.dags.gitSync.enabled | ternary "true" "false" }}
{{- end }}
{{- define "airflow_config_path" -}}
{{- printf "%s/airflow.cfg" .Values.airflowHome | quote }}
{{- end }}
@@ -617,22 +619,22 @@
{{- define "airflow_webserver_config_mount" -}}
- name: webserver-config
mountPath: {{ template "airflow_webserver_config_path" . }}
subPath: webserver_config.py
- readOnly: True
+ readOnly: true
{{- end }}
{{- define "airflow_api_server_config_configmap_name" -}}
{{- default (printf "%s-api-server-config" (include "airflow.fullname"
.)) .Values.apiServer.apiServerConfigConfigMapName }}
{{- end }}
{{- define "airflow_api_server_config_mount" -}}
- name: api-server-config
mountPath: {{ template "airflow_webserver_config_path" . }}
subPath: webserver_config.py
- readOnly: True
+ readOnly: true
{{- end }}
{{- define "airflow_local_setting_path" -}}
{{- printf "%s/config/airflow_local_settings.py" .Values.airflowHome |
quote }}
{{- end }}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]