You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/03/12 19:40:08 UTC
[airflow] branch main updated: Reformat chart templates part 2 (#29941)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3b3b44aabf Reformat chart templates part 2 (#29941)
3b3b44aabf is described below
commit 3b3b44aabffc571d6a2cfaff01712a2b2d5dfb1e
Author: Denis Krivenko <dn...@gmail.com>
AuthorDate: Sun Mar 12 20:39:56 2023 +0100
Reformat chart templates part 2 (#29941)
---
chart/files/pod-template-file.kubernetes-helm-yaml | 75 ++++---
chart/templates/_helpers.yaml | 51 +++--
chart/templates/dags-persistent-volume-claim.yaml | 5 +-
chart/templates/flower/flower-deployment.yaml | 66 +++---
chart/templates/flower/flower-ingress.yaml | 9 +-
chart/templates/flower/flower-networkpolicy.yaml | 13 +-
chart/templates/flower/flower-service.yaml | 16 +-
chart/templates/flower/flower-serviceaccount.yaml | 9 +-
.../jobs/create-user-job-serviceaccount.yaml | 9 +-
chart/templates/jobs/create-user-job.yaml | 72 +++----
.../jobs/migrate-database-job-serviceaccount.yaml | 5 +-
chart/templates/jobs/migrate-database-job.yaml | 72 +++----
chart/templates/limitrange.yaml | 9 +-
chart/templates/logs-persistent-volume-claim.yaml | 5 +-
.../templates/pgbouncer/pgbouncer-deployment.yaml | 73 +++----
.../pgbouncer/pgbouncer-networkpolicy.yaml | 25 ++-
.../pgbouncer/pgbouncer-poddisruptionbudget.yaml | 6 +-
chart/templates/pgbouncer/pgbouncer-service.yaml | 12 +-
.../pgbouncer/pgbouncer-serviceaccount.yaml | 5 +-
chart/templates/rbac/pod-cleanup-role.yaml | 6 +-
chart/templates/rbac/pod-cleanup-rolebinding.yaml | 6 +-
chart/templates/rbac/pod-launcher-role.yaml | 11 +-
chart/templates/rbac/pod-launcher-rolebinding.yaml | 24 +--
chart/templates/rbac/pod-log-reader-role.yaml | 10 +-
.../templates/rbac/pod-log-reader-rolebinding.yaml | 24 +--
.../security-context-constraint-rolebinding.yaml | 34 +--
chart/templates/resourcequota.yaml | 9 +-
.../templates/scheduler/scheduler-deployment.yaml | 194 ++++++++---------
.../scheduler/scheduler-networkpolicy.yaml | 10 +-
.../scheduler/scheduler-poddisruptionbudget.yaml | 6 +-
chart/templates/scheduler/scheduler-service.yaml | 6 +-
.../scheduler/scheduler-serviceaccount.yaml | 6 +-
chart/templates/secrets/elasticsearch-secret.yaml | 8 +-
chart/templates/secrets/extra-secrets.yaml | 16 +-
chart/templates/secrets/fernetkey-secret.yaml | 6 +-
chart/templates/secrets/flower-secret.yaml | 6 +-
.../templates/secrets/kerberos-keytab-secret.yaml | 6 +-
.../secrets/metadata-connection-secret.yaml | 6 +-
.../secrets/pgbouncer-certificates-secret.yaml | 18 +-
.../templates/secrets/pgbouncer-config-secret.yaml | 6 +-
.../templates/secrets/pgbouncer-stats-secret.yaml | 6 +-
chart/templates/secrets/redis-secrets.yaml | 14 +-
chart/templates/secrets/registry-secret.yaml | 6 +-
.../secrets/result-backend-connection-secret.yaml | 7 +-
.../secrets/webserver-secret-key-secret.yaml | 6 +-
.../templates/triggerer/triggerer-deployment.yaml | 150 ++++++-------
.../triggerer/triggerer-networkpolicy.yaml | 6 +-
chart/templates/triggerer/triggerer-service.yaml | 6 +-
.../triggerer/triggerer-serviceaccount.yaml | 9 +-
.../templates/webserver/webserver-deployment.yaml | 167 +++++++--------
chart/templates/webserver/webserver-ingress.yaml | 9 +-
.../webserver/webserver-networkpolicy.yaml | 13 +-
.../webserver/webserver-poddisruptionbudget.yaml | 6 +-
chart/templates/webserver/webserver-service.yaml | 16 +-
.../webserver/webserver-serviceaccount.yaml | 9 +-
chart/templates/workers/worker-deployment.yaml | 233 ++++++++++-----------
chart/templates/workers/worker-kedaautoscaler.yaml | 13 +-
chart/templates/workers/worker-networkpolicy.yaml | 6 +-
chart/templates/workers/worker-service.yaml | 6 +-
chart/templates/workers/worker-serviceaccount.yaml | 9 +-
60 files changed, 772 insertions(+), 880 deletions(-)
diff --git a/chart/files/pod-template-file.kubernetes-helm-yaml b/chart/files/pod-template-file.kubernetes-helm-yaml
index b7a5a1cd5e..f00477a7f2 100644
--- a/chart/files/pod-template-file.kubernetes-helm-yaml
+++ b/chart/files/pod-template-file.kubernetes-helm-yaml
@@ -28,72 +28,69 @@ metadata:
tier: airflow
component: worker
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- if or .Values.airflowPodAnnotations .Values.workers.podAnnotations }}
annotations:
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 4 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 4 }}
{{- end }}
{{- if .Values.workers.podAnnotations }}
- {{- toYaml .Values.workers.podAnnotations | nindent 4 }}
+ {{- toYaml .Values.workers.podAnnotations | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- if or (and .Values.dags.gitSync.enabled (not .Values.dags.persistence.enabled)) .Values.workers.extraInitContainers }}
initContainers:
{{- if and .Values.dags.gitSync.enabled (not .Values.dags.persistence.enabled) }}
- {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 4 }}
+ {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 4 }}
{{- end }}
{{- if .Values.workers.extraInitContainers }}
- {{- toYaml .Values.workers.extraInitContainers | nindent 4 }}
+ {{- toYaml .Values.workers.extraInitContainers | nindent 4 }}
{{- end }}
{{- end }}
containers:
- - envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 6 }}
+ - envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 6 }}
env:
- name: AIRFLOW__CORE__EXECUTOR
value: LocalExecutor
-{{- include "standard_airflow_environment" . | indent 6}}
-{{- include "custom_airflow_environment" . | indent 6 }}
-{{- include "container_extra_envs" (list . .Values.workers.env) | indent 6 }}
+ {{- include "standard_airflow_environment" . | indent 6}}
+ {{- include "custom_airflow_environment" . | indent 6 }}
+ {{- include "container_extra_envs" (list . .Values.workers.env) | indent 6 }}
image: {{ template "pod_template_image" . }}
imagePullPolicy: {{ .Values.images.pod_template.pullPolicy }}
name: base
- resources:
-{{ toYaml .Values.workers.resources | indent 8 }}
+ resources: {{- toYaml .Values.workers.resources | nindent 8 }}
volumeMounts:
- mountPath: {{ template "airflow_logs" . }}
name: logs
-{{- include "airflow_config_mount" . | nindent 8 }}
-{{- if or .Values.dags.gitSync.enabled .Values.dags.persistence.enabled }}
- {{- include "airflow_dags_mount" . | nindent 8 }}
-{{- end }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 8 }}
-{{- end }}
-{{- if .Values.workers.extraVolumeMounts }}
-{{ toYaml .Values.workers.extraVolumeMounts | indent 8 }}
-{{- end }}
-{{- if .Values.workers.extraContainers }}
-{{- toYaml .Values.workers.extraContainers | nindent 4 }}
-{{- end }}
+ {{- include "airflow_config_mount" . | nindent 8 }}
+ {{- if or .Values.dags.gitSync.enabled .Values.dags.persistence.enabled }}
+ {{- include "airflow_dags_mount" . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 8 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumeMounts }}
+ {{- toYaml .Values.workers.extraVolumeMounts | nindent 8 }}
+ {{- end }}
+ {{- if .Values.workers.extraContainers }}
+ {{- toYaml .Values.workers.extraContainers | nindent 4 }}
+ {{- end }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
imagePullSecrets:
- name: {{ template "registry_secret" . }}
{{- end }}
-{{- if .Values.workers.hostAliases }}
- hostAliases:
-{{ toYaml .Values.workers.hostAliases | indent 4 }}
-{{- end }}
+ {{- if .Values.workers.hostAliases }}
+ hostAliases: {{- toYaml .Values.workers.hostAliases | nindent 4 }}
+ {{- end }}
restartPolicy: Never
- securityContext: {{ $securityContext | nindent 4 }}
- nodeSelector: {{ toYaml $nodeSelector | nindent 4 }}
- affinity: {{ toYaml $affinity | nindent 4 }}
- tolerations: {{ toYaml $tolerations | nindent 4 }}
- topologySpreadConstraints: {{ toYaml $topologySpreadConstraints | nindent 4 }}
+ securityContext: {{- $securityContext | nindent 4 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 4 }}
+ affinity: {{- toYaml $affinity | nindent 4 }}
+ tolerations: {{- toYaml $tolerations | nindent 4 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 4 }}
serviceAccountName: {{ include "worker.serviceAccountName" . }}
volumes:
{{- if .Values.dags.persistence.enabled }}
@@ -113,14 +110,14 @@ spec:
name: logs
{{- end }}
{{- if and .Values.dags.gitSync.enabled .Values.dags.gitSync.sshKeySecret }}
- {{- include "git_sync_ssh_key_volume" . | nindent 2 }}
+ {{- include "git_sync_ssh_key_volume" . | nindent 2 }}
{{- end }}
- configMap:
name: {{ include "airflow_config" . }}
name: config
{{- if .Values.volumes }}
- {{- toYaml .Values.volumes | nindent 2 }}
+ {{- toYaml .Values.volumes | nindent 2 }}
{{- end }}
{{- if .Values.workers.extraVolumes }}
- {{ toYaml .Values.workers.extraVolumes | nindent 2 }}
+ {{- toYaml .Values.workers.extraVolumes | nindent 2 }}
{{- end }}
diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 751878dc93..c43ee0aedc 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -21,16 +21,16 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "airflow.fullname" -}}
-{{- if .Values.fullnameOverride }}
-{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- $name := default .Chart.Name .Values.nameOverride }}
-{{- if contains $name .Release.Name }}
-{{- .Release.Name | trunc 63 | trimSuffix "-" }}
-{{- else }}
-{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
-{{- end }}
-{{- end }}
+ {{- if .Values.fullnameOverride }}
+ {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+ {{- else }}
+ {{- $name := default .Chart.Name .Values.nameOverride }}
+ {{- if contains $name .Release.Name }}
+ {{- .Release.Name | trunc 63 | trimSuffix "-" }}
+ {{- else }}
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+ {{- end }}
+ {{- end }}
{{- end }}
@@ -403,27 +403,27 @@ server_tls_key_file = /etc/pgbouncer/server.key
{{- end }}
{{ define "airflow_logs_volume_claim" -}}
-{{- if .Values.logs.persistence.existingClaim -}}
-{{ .Values.logs.persistence.existingClaim }}
-{{- else -}}
-{{ .Release.Name }}-logs
-{{- end -}}
+ {{- if .Values.logs.persistence.existingClaim -}}
+ {{- .Values.logs.persistence.existingClaim }}
+ {{- else -}}
+ {{- .Release.Name }}-logs
+ {{- end -}}
{{- end -}}
{{ define "airflow_dags" -}}
-{{- if .Values.dags.gitSync.enabled -}}
-{{ (printf "%s/dags/repo/%s" .Values.airflowHome .Values.dags.gitSync.subPath) }}
-{{- else -}}
-{{ (printf "%s/dags" .Values.airflowHome) }}
-{{- end -}}
+ {{- if .Values.dags.gitSync.enabled -}}
+ {{- (printf "%s/dags/repo/%s" .Values.airflowHome .Values.dags.gitSync.subPath) }}
+ {{- else -}}
+ {{- (printf "%s/dags" .Values.airflowHome) }}
+ {{- end -}}
{{- end -}}
{{ define "airflow_dags_volume_claim" -}}
-{{- if .Values.dags.persistence.existingClaim -}}
-{{ .Values.dags.persistence.existingClaim }}
-{{- else -}}
-{{ .Release.Name }}-dags
-{{- end -}}
+ {{- if .Values.dags.persistence.existingClaim -}}
+ {{- .Values.dags.persistence.existingClaim }}
+ {{- else -}}
+ {{- .Release.Name }}-dags
+ {{- end -}}
{{- end -}}
{{ define "airflow_dags_mount" -}}
@@ -656,7 +656,6 @@ Create the name of the cleanup service account to use
{{- end }}
{{define "scheduler_liveness_check_command"}}
-
{{- if semverCompare ">=2.5.0" .Values.airflowVersion }}
- sh
- -c
diff --git a/chart/templates/dags-persistent-volume-claim.yaml b/chart/templates/dags-persistent-volume-claim.yaml
index 4e878853ba..125f865f0d 100644
--- a/chart/templates/dags-persistent-volume-claim.yaml
+++ b/chart/templates/dags-persistent-volume-claim.yaml
@@ -27,11 +27,10 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{- toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.dags.persistence.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes: [{{ .Values.dags.persistence.accessMode | quote }}]
diff --git a/chart/templates/flower/flower-deployment.yaml b/chart/templates/flower/flower-deployment.yaml
index 85f0e43f43..af86fbd202 100644
--- a/chart/templates/flower/flower-deployment.yaml
+++ b/chart/templates/flower/flower-deployment.yaml
@@ -36,12 +36,11 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- if .Values.flower.annotations }}
- annotations:
- {{- toYaml .Values.flower.annotations | nindent 4 }}
+ annotations: {{- toYaml .Values.flower.annotations | nindent 4 }}
{{- end }}
spec:
replicas: 1
@@ -59,24 +58,20 @@ spec:
tier: airflow
component: flower
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.flower.labels) }}
-{{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.flower.labels) }}
+ {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
annotations:
checksum/airflow-config: {{ include (print $.Template.BasePath "/configmaps/configmap.yaml") . | sha256sum }}
checksum/flower-secret: {{ include (print $.Template.BasePath "/secrets/flower-secret.yaml") . | sha256sum }}
- {{- if or (.Values.airflowPodAnnotations) (.Values.flower.podAnnotations) }}
- {{- mustMerge .Values.flower.podAnnotations .Values.airflowPodAnnotations | toYaml | nindent 8 }}
- {{- end }}
+ {{- if or (.Values.airflowPodAnnotations) (.Values.flower.podAnnotations) }}
+ {{- mustMerge .Values.flower.podAnnotations .Values.airflowPodAnnotations | toYaml | nindent 8 }}
+ {{- end }}
spec:
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
- affinity:
-{{ toYaml $affinity | indent 8 }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
+ affinity: {{- toYaml $affinity | nindent 8 }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
serviceAccountName: {{ include "flower.serviceAccountName" . }}
{{- if .Values.flower.priorityClassName }}
priorityClassName: {{ .Values.flower.priorityClassName }}
@@ -97,15 +92,14 @@ spec:
{{- if .Values.flower.args }}
args: {{ tpl (toYaml .Values.flower.args) . | nindent 12 }}
{{- end }}
- resources:
-{{ toYaml .Values.flower.resources | indent 12 }}
+ resources: {{- toYaml .Values.flower.resources | nindent 12 }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
- {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.flower.extraVolumeMounts }}
- {{ toYaml .Values.flower.extraVolumeMounts | nindent 12 }}
+ {{- toYaml .Values.flower.extraVolumeMounts | nindent 12 }}
{{- end }}
ports:
- name: flower-ui
@@ -144,21 +138,21 @@ spec:
name: {{ template "flower_secret" . }}
key: basicAuth
{{- end }}
- {{- include "standard_airflow_environment" . | indent 10 }}
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "container_extra_envs" (list . .Values.flower.env) | indent 10 }}
-{{- if .Values.flower.extraContainers }}
-{{- toYaml .Values.flower.extraContainers | nindent 8 }}
-{{- end }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "container_extra_envs" (list . .Values.flower.env) | indent 10 }}
+ {{- if .Values.flower.extraContainers }}
+ {{- toYaml .Values.flower.extraContainers | nindent 8 }}
+ {{- end }}
volumes:
- name: config
configMap:
name: {{ template "airflow_config" . }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.flower.extraVolumes }}
-{{ toYaml .Values.flower.extraVolumes | indent 8 }}
-{{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.flower.extraVolumes }}
+ {{- toYaml .Values.flower.extraVolumes | nindent 8 }}
+ {{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/flower/flower-ingress.yaml b/chart/templates/flower/flower-ingress.yaml
index 17a47a6c51..8b019e0eae 100644
--- a/chart/templates/flower/flower-ingress.yaml
+++ b/chart/templates/flower/flower-ingress.yaml
@@ -30,12 +30,11 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.flower.labels) }}
-{{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.flower.labels) }}
+ {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.ingress.flower.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.flower.hosts (.Values.ingress.flower.hosts | first | kindIs "string" | not) }}
diff --git a/chart/templates/flower/flower-networkpolicy.yaml b/chart/templates/flower/flower-networkpolicy.yaml
index 32a0e5288c..a4eb2f21c4 100644
--- a/chart/templates/flower/flower-networkpolicy.yaml
+++ b/chart/templates/flower/flower-networkpolicy.yaml
@@ -32,9 +32,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.flower.labels) }}
-{{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.flower.labels) }}
+ {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
@@ -43,10 +43,9 @@ spec:
release: {{ .Release.Name }}
policyTypes:
- Ingress
-{{- if $from }}
+ {{- if $from }}
ingress:
- - from:
-{{ toYaml $from | indent 6 }}
+ - from: {{- toYaml $from | nindent 6 }}
ports:
{{ range .Values.flower.networkPolicy.ingress.ports }}
-
@@ -54,6 +53,6 @@ spec:
{{ $key }}: {{ tpl (toString $val) $ }}
{{- end }}
{{- end }}
-{{- end }}
+ {{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/flower/flower-service.yaml b/chart/templates/flower/flower-service.yaml
index 07e114e9db..f5fc36482f 100644
--- a/chart/templates/flower/flower-service.yaml
+++ b/chart/templates/flower/flower-service.yaml
@@ -30,13 +30,12 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.flower.labels) }}
-{{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
-{{- with .Values.flower.service.annotations }}
- annotations:
-{{- toYaml . | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.flower.labels) }}
+ {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
+ {{- with .Values.flower.service.annotations }}
+ annotations: {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
type: {{ .Values.flower.service.type }}
selector:
@@ -54,8 +53,7 @@ spec:
loadBalancerIP: {{ .Values.flower.service.loadBalancerIP }}
{{- end }}
{{- if .Values.flower.service.loadBalancerSourceRanges }}
- loadBalancerSourceRanges:
- {{- toYaml .Values.flower.service.loadBalancerSourceRanges | nindent 4 }}
+ loadBalancerSourceRanges: {{- toYaml .Values.flower.service.loadBalancerSourceRanges | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/flower/flower-serviceaccount.yaml b/chart/templates/flower/flower-serviceaccount.yaml
index ab05a06baf..1ab739dcd8 100644
--- a/chart/templates/flower/flower-serviceaccount.yaml
+++ b/chart/templates/flower/flower-serviceaccount.yaml
@@ -29,11 +29,10 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.flower.labels) }}
-{{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.flower.labels) }}
+ {{- mustMerge .Values.flower.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.flower.serviceAccount.annotations }}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
diff --git a/chart/templates/jobs/create-user-job-serviceaccount.yaml b/chart/templates/jobs/create-user-job-serviceaccount.yaml
index f81b0819ee..98f1f6c0f4 100644
--- a/chart/templates/jobs/create-user-job-serviceaccount.yaml
+++ b/chart/templates/jobs/create-user-job-serviceaccount.yaml
@@ -29,11 +29,10 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.createUserJob.labels) }}
-{{- mustMerge .Values.createUserJob.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.createUserJob.labels) }}
+ {{- mustMerge .Values.createUserJob.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.createUserJob.serviceAccount.annotations }}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
diff --git a/chart/templates/jobs/create-user-job.yaml b/chart/templates/jobs/create-user-job.yaml
index c9f57d5aa9..02623fdda0 100644
--- a/chart/templates/jobs/create-user-job.yaml
+++ b/chart/templates/jobs/create-user-job.yaml
@@ -34,9 +34,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- $annotations := dict }}
{{- if .Values.createUserJob.useHelmHooks }}
{{- $_ := set $annotations "helm.sh/hook" "post-install,post-upgrade" }}
@@ -44,8 +44,7 @@ metadata:
{{- $_ := set $annotations "helm.sh/hook-delete-policy" "before-hook-creation,hook-succeeded" }}
{{- end }}
{{- with $annotations := merge $annotations .Values.createUserJob.jobAnnotations }}
- annotations:
- {{- $annotations | toYaml | nindent 4 }}
+ annotations: {{- $annotations | toYaml | nindent 4 }}
{{- end }}
spec:
{{- if not (kindIs "invalid" .Values.createUserJob.ttlSecondsAfterFinished) }}
@@ -57,29 +56,25 @@ spec:
tier: airflow
component: create-user-job
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.createUserJob.labels) }}
-{{- mustMerge .Values.createUserJob.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.createUserJob.labels) }}
+ {{- mustMerge .Values.createUserJob.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
{{- if or .Values.airflowPodAnnotations .Values.createUserJob.annotations }}
annotations:
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.createUserJob.annotations }}
- {{- toYaml .Values.createUserJob.annotations | nindent 8 }}
+ {{- toYaml .Values.createUserJob.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
securityContext: {{ $securityContext | nindent 8 }}
restartPolicy: OnFailure
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
- affinity:
-{{ toYaml $affinity | indent 8 }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
+ affinity: {{- toYaml $affinity | nindent 8 }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
serviceAccountName: {{ include "createUserJob.serviceAccountName" . }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
imagePullSecrets:
@@ -96,36 +91,33 @@ spec:
args: {{ tpl (toYaml .Values.createUserJob.args) . | nindent 12 }}
{{- end }}
{{- if .Values.createUserJob.applyCustomEnv }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
- env:
- {{- include "custom_airflow_environment" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ env: {{- include "custom_airflow_environment" . | indent 10 }}
{{ else }}
env:
{{- end }}
{{- include "standard_airflow_environment" . | indent 10 }}
{{- include "container_extra_envs" (list . .Values.createUserJob.env) | indent 10 }}
- resources:
-{{ toYaml .Values.createUserJob.resources | indent 12 }}
+ resources: {{- toYaml .Values.createUserJob.resources | nindent 12 }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.createUserJob.extraVolumeMounts }}
-{{ toYaml .Values.createUserJob.extraVolumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.createUserJob.extraContainers }}
-{{- toYaml .Values.createUserJob.extraContainers | nindent 8 }}
-{{- end }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.createUserJob.extraVolumeMounts }}
+ {{ toYaml .Values.createUserJob.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.createUserJob.extraContainers }}
+ {{- toYaml .Values.createUserJob.extraContainers | nindent 8 }}
+ {{- end }}
volumes:
- name: config
configMap:
name: {{ template "airflow_config" . }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.createUserJob.extraVolumes }}
-{{ toYaml .Values.createUserJob.extraVolumes | nindent 8 }}
-{{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.createUserJob.extraVolumes }}
+ {{- toYaml .Values.createUserJob.extraVolumes | nindent 8 }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/jobs/migrate-database-job-serviceaccount.yaml b/chart/templates/jobs/migrate-database-job-serviceaccount.yaml
index db416640fe..9fbfcf6795 100644
--- a/chart/templates/jobs/migrate-database-job-serviceaccount.yaml
+++ b/chart/templates/jobs/migrate-database-job-serviceaccount.yaml
@@ -30,10 +30,9 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{ toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.migrateDatabaseJob.serviceAccount.annotations }}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
diff --git a/chart/templates/jobs/migrate-database-job.yaml b/chart/templates/jobs/migrate-database-job.yaml
index 2d12c6fbed..199f551697 100644
--- a/chart/templates/jobs/migrate-database-job.yaml
+++ b/chart/templates/jobs/migrate-database-job.yaml
@@ -34,9 +34,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- $annotations := dict }}
{{- if .Values.migrateDatabaseJob.useHelmHooks }}
{{- $_ := set $annotations "helm.sh/hook" "post-install,post-upgrade" }}
@@ -44,8 +44,7 @@ metadata:
{{- $_ := set $annotations "helm.sh/hook-delete-policy" "before-hook-creation,hook-succeeded" }}
{{- end }}
{{- with $annotations := merge $annotations .Values.migrateDatabaseJob.jobAnnotations }}
- annotations:
- {{- $annotations | toYaml | nindent 4 }}
+ annotations: {{- $annotations | toYaml | nindent 4 }}
{{- end }}
spec:
{{- if not (kindIs "invalid" .Values.migrateDatabaseJob.ttlSecondsAfterFinished) }}
@@ -57,29 +56,25 @@ spec:
tier: airflow
component: run-airflow-migrations
release: {{ .Release.Name }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 8 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- if or .Values.airflowPodAnnotations .Values.migrateDatabaseJob.annotations }}
annotations:
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.migrateDatabaseJob.annotations }}
- {{- toYaml .Values.migrateDatabaseJob.annotations | nindent 8 }}
+ {{- toYaml .Values.migrateDatabaseJob.annotations | nindent 8 }}
{{- end }}
{{- end }}
spec:
securityContext: {{ $securityContext | nindent 8 }}
restartPolicy: OnFailure
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
- affinity:
-{{ toYaml $affinity | indent 8 }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
+ affinity: {{- toYaml $affinity | nindent 8 }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
serviceAccountName: {{ include "migrateDatabaseJob.serviceAccountName" . }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
imagePullSecrets:
@@ -96,37 +91,34 @@ spec:
args: {{ tpl (toYaml .Values.migrateDatabaseJob.args) . | nindent 12 }}
{{- end }}
{{- if .Values.migrateDatabaseJob.applyCustomEnv }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
- env:
- {{- include "custom_airflow_environment" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ env: {{- include "custom_airflow_environment" . | indent 10 }}
{{ else }}
env:
{{- end }}
- name: PYTHONUNBUFFERED
value: "1"
{{- include "standard_airflow_environment" . | indent 10 }}
- resources:
-{{ toYaml .Values.migrateDatabaseJob.resources | indent 12 }}
+ resources: {{- toYaml .Values.migrateDatabaseJob.resources | nindent 12 }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.migrateDatabaseJob.extraVolumeMounts }}
-{{ toYaml .Values.migrateDatabaseJob.extraVolumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.migrateDatabaseJob.extraContainers }}
-{{- toYaml .Values.migrateDatabaseJob.extraContainers | nindent 8 }}
-{{- end }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.migrateDatabaseJob.extraVolumeMounts }}
+ {{ toYaml .Values.migrateDatabaseJob.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.migrateDatabaseJob.extraContainers }}
+ {{- toYaml .Values.migrateDatabaseJob.extraContainers | nindent 8 }}
+ {{- end }}
volumes:
- name: config
configMap:
name: {{ template "airflow_config" . }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.migrateDatabaseJob.extraVolumes }}
-{{ toYaml .Values.migrateDatabaseJob.extraVolumes | nindent 8 }}
-{{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.migrateDatabaseJob.extraVolumes }}
+ {{- toYaml .Values.migrateDatabaseJob.extraVolumes | nindent 8 }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/limitrange.yaml b/chart/templates/limitrange.yaml
index 7bf099af26..bbd722d86c 100644
--- a/chart/templates/limitrange.yaml
+++ b/chart/templates/limitrange.yaml
@@ -29,10 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
- limits:
-{{ toYaml .Values.limits | indent 4 }}
+ limits: {{- toYaml .Values.limits | nindent 4 }}
{{- end }}
diff --git a/chart/templates/logs-persistent-volume-claim.yaml b/chart/templates/logs-persistent-volume-claim.yaml
index 07374c1fd5..4ca37e01bb 100644
--- a/chart/templates/logs-persistent-volume-claim.yaml
+++ b/chart/templates/logs-persistent-volume-claim.yaml
@@ -27,11 +27,10 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{- toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.logs.persistence.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes: ["ReadWriteMany"]
diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
index 9a103bc8fd..1d2601a945 100644
--- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
@@ -34,12 +34,11 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- if .Values.pgbouncer.annotations }}
- annotations:
- {{- toYaml .Values.pgbouncer.annotations | nindent 4 }}
+ annotations: {{- toYaml .Values.pgbouncer.annotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.pgbouncer.replicas | default "1" }}
@@ -61,9 +60,9 @@ spec:
tier: airflow
component: pgbouncer
release: {{ .Release.Name }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 8 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
annotations:
checksum/pgbouncer-config-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-config-secret.yaml") . | sha256sum }}
checksum/pgbouncer-certificates-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-certificates-secret.yaml") . | sha256sum }}
@@ -71,14 +70,10 @@ spec:
{{- if .Values.pgbouncer.priorityClassName }}
priorityClassName: {{ .Values.pgbouncer.priorityClassName }}
{{- end }}
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
- affinity:
-{{ toYaml $affinity | indent 8 }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
+ affinity: {{- toYaml $affinity | nindent 8 }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
serviceAccountName: {{ include "pgbouncer.serviceAccountName" . }}
securityContext:
runAsUser: {{ .Values.pgbouncer.uid }}
@@ -97,8 +92,7 @@ spec:
{{- if .Values.pgbouncer.args }}
args: {{ tpl (toYaml .Values.pgbouncer.args) . | nindent 12 }}
{{- end }}
- resources:
-{{ toYaml .Values.pgbouncer.resources | indent 12 }}
+ resources: {{- toYaml .Values.pgbouncer.resources | nindent 12 }}
ports:
- name: pgbouncer
containerPort: {{ .Values.ports.pgbouncer }}
@@ -117,38 +111,37 @@ spec:
subPath: users.txt
mountPath: /etc/pgbouncer/users.txt
readOnly: true
-{{- if .Values.pgbouncer.ssl.ca }}
+ {{- if .Values.pgbouncer.ssl.ca }}
- name: pgbouncer-certificates
subPath: root.crt
mountPath: /etc/pgbouncer/root.crt
readOnly: true
-{{- end }}
-{{- if .Values.pgbouncer.ssl.cert }}
+ {{- end }}
+ {{- if .Values.pgbouncer.ssl.cert }}
- name: pgbouncer-certificates
subPath: server.crt
mountPath: /etc/pgbouncer/server.crt
readOnly: true
-{{- end }}
-{{- if .Values.pgbouncer.ssl.key }}
+ {{- end }}
+ {{- if .Values.pgbouncer.ssl.key }}
- name: pgbouncer-certificates
subPath: server.key
mountPath: /etc/pgbouncer/server.key
readOnly: true
-{{- end }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.pgbouncer.extraVolumeMounts }}
-{{ toYaml .Values.pgbouncer.extraVolumeMounts | indent 12 }}
-{{- end }}
+ {{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.pgbouncer.extraVolumeMounts }}
+ {{- toYaml .Values.pgbouncer.extraVolumeMounts | nindent 12 }}
+ {{- end }}
lifecycle:
preStop:
exec:
# Allow existing queries clients to complete within 120 seconds
command: ["/bin/sh", "-c", "killall -INT pgbouncer && sleep 120"]
- name: metrics-exporter
- resources:
-{{ toYaml .Values.pgbouncer.metricsExporterSidecar.resources | indent 12 }}
+ resources: {{- toYaml .Values.pgbouncer.metricsExporterSidecar.resources | nindent 12 }}
image: {{ template "pgbouncer_exporter_image" . }}
imagePullPolicy: {{ .Values.images.pgbouncerExporter.pullPolicy }}
env:
@@ -180,15 +173,15 @@ spec:
- name: pgbouncer-config
secret:
secretName: {{ template "pgbouncer_config_secret" . }}
-{{- if or .Values.pgbouncer.ssl.ca .Values.pgbouncer.ssl.cert .Values.pgbouncer.ssl.key }}
+ {{- if or .Values.pgbouncer.ssl.ca .Values.pgbouncer.ssl.cert .Values.pgbouncer.ssl.key }}
- name: pgbouncer-certificates
secret:
secretName: {{ template "pgbouncer_certificates_secret" . }}
-{{- end }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.pgbouncer.extraVolumes }}
-{{ toYaml .Values.pgbouncer.extraVolumes | indent 8 }}
-{{- end }}
+ {{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.pgbouncer.extraVolumes }}
+ {{- toYaml .Values.pgbouncer.extraVolumes | nindent 8 }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml b/chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml
index aa27f553ad..a915f7756d 100644
--- a/chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-networkpolicy.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
@@ -46,21 +46,20 @@ spec:
matchLabels:
tier: airflow
release: {{ .Release.Name }}
-{{- if .Values.workers.keda.enabled }}
-{{- if .Values.workers.keda.namespaceLabels }}
+ {{- if .Values.workers.keda.enabled }}
+ {{- if .Values.workers.keda.namespaceLabels }}
- namespaceSelector:
- matchLabels:
-{{ toYaml .Values.workers.keda.namespaceLabels | indent 10}}
+ matchLabels: {{- toYaml .Values.workers.keda.namespaceLabels | nindent 10 }}
podSelector:
-{{- else }}
+ {{- else }}
- podSelector:
-{{- end }}
+ {{- end }}
matchLabels:
app: keda-operator
-{{- end}}
-{{- if .Values.pgbouncer.extraNetworkPolicies}}
-{{ toYaml .Values.pgbouncer.extraNetworkPolicies | indent 4}}
-{{- end}}
+ {{- end}}
+ {{- if .Values.pgbouncer.extraNetworkPolicies}}
+ {{- toYaml .Values.pgbouncer.extraNetworkPolicies | nindent 4 }}
+ {{- end}}
ports:
- protocol: TCP
port: {{ .Values.ports.pgbouncer }}
diff --git a/chart/templates/pgbouncer/pgbouncer-poddisruptionbudget.yaml b/chart/templates/pgbouncer/pgbouncer-poddisruptionbudget.yaml
index 41999da145..6b5dbd73a3 100644
--- a/chart/templates/pgbouncer/pgbouncer-poddisruptionbudget.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-poddisruptionbudget.yaml
@@ -33,9 +33,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
diff --git a/chart/templates/pgbouncer/pgbouncer-service.yaml b/chart/templates/pgbouncer/pgbouncer-service.yaml
index fd37b38c4c..422abbee8d 100644
--- a/chart/templates/pgbouncer/pgbouncer-service.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-service.yaml
@@ -29,15 +29,15 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.ports.pgbouncerScrape | quote }}
-{{- if .Values.pgbouncer.service.extraAnnotations }}
-{{- toYaml .Values.pgbouncer.service.extraAnnotations | nindent 4 }}
-{{- end }}
+ {{- if .Values.pgbouncer.service.extraAnnotations }}
+ {{- toYaml .Values.pgbouncer.service.extraAnnotations | nindent 4 }}
+ {{- end }}
spec:
type: ClusterIP
selector:
diff --git a/chart/templates/pgbouncer/pgbouncer-serviceaccount.yaml b/chart/templates/pgbouncer/pgbouncer-serviceaccount.yaml
index c116a39e7b..38f00bbaa5 100644
--- a/chart/templates/pgbouncer/pgbouncer-serviceaccount.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-serviceaccount.yaml
@@ -30,10 +30,9 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{ toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.pgbouncer.serviceAccount.annotations }}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
diff --git a/chart/templates/rbac/pod-cleanup-role.yaml b/chart/templates/rbac/pod-cleanup-role.yaml
index dd7d9a3371..6d759e787f 100644
--- a/chart/templates/rbac/pod-cleanup-role.yaml
+++ b/chart/templates/rbac/pod-cleanup-role.yaml
@@ -28,9 +28,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
rules:
- apiGroups:
- ""
diff --git a/chart/templates/rbac/pod-cleanup-rolebinding.yaml b/chart/templates/rbac/pod-cleanup-rolebinding.yaml
index a5a14d0225..6bc4d8ca43 100644
--- a/chart/templates/rbac/pod-cleanup-rolebinding.yaml
+++ b/chart/templates/rbac/pod-cleanup-rolebinding.yaml
@@ -28,9 +28,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
diff --git a/chart/templates/rbac/pod-launcher-role.yaml b/chart/templates/rbac/pod-launcher-role.yaml
index ff57eb13e1..9865acf48e 100644
--- a/chart/templates/rbac/pod-launcher-role.yaml
+++ b/chart/templates/rbac/pod-launcher-role.yaml
@@ -27,17 +27,17 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-pod-launcher-role
-{{- if not .Values.multiNamespaceMode }}
+ {{- if not .Values.multiNamespaceMode }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
labels:
tier: airflow
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
rules:
- apiGroups:
- ""
@@ -69,5 +69,4 @@ rules:
- "events"
verbs:
- "list"
-
{{- end }}
diff --git a/chart/templates/rbac/pod-launcher-rolebinding.yaml b/chart/templates/rbac/pod-launcher-rolebinding.yaml
index 25cf3f5ef6..5668e4e835 100644
--- a/chart/templates/rbac/pod-launcher-rolebinding.yaml
+++ b/chart/templates/rbac/pod-launcher-rolebinding.yaml
@@ -28,35 +28,35 @@ kind: RoleBinding
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
metadata:
-{{- if not .Values.multiNamespaceMode }}
+ {{- if not .Values.multiNamespaceMode }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
name: {{ .Release.Name }}-pod-launcher-rolebinding
labels:
tier: airflow
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
-{{- if .Values.multiNamespaceMode }}
+ {{- if .Values.multiNamespaceMode }}
kind: ClusterRole
-{{- else }}
+ {{- else }}
kind: Role
-{{- end }}
+ {{- end }}
name: {{ .Release.Name }}-pod-launcher-role
subjects:
-{{- if has .Values.executor $schedulerLaunchExecutors }}
+ {{- if has .Values.executor $schedulerLaunchExecutors }}
- kind: ServiceAccount
name: {{ include "scheduler.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
-{{- if has .Values.executor $workerLaunchExecutors }}
+ {{- end }}
+ {{- if has .Values.executor $workerLaunchExecutors }}
- kind: ServiceAccount
name: {{ include "worker.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/rbac/pod-log-reader-role.yaml b/chart/templates/rbac/pod-log-reader-role.yaml
index d46e3e29d4..3c5d169f4a 100644
--- a/chart/templates/rbac/pod-log-reader-role.yaml
+++ b/chart/templates/rbac/pod-log-reader-role.yaml
@@ -27,17 +27,17 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-pod-log-reader-role
-{{- if not .Values.multiNamespaceMode }}
+ {{- if not .Values.multiNamespaceMode }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
labels:
tier: airflow
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
rules:
- apiGroups:
- ""
diff --git a/chart/templates/rbac/pod-log-reader-rolebinding.yaml b/chart/templates/rbac/pod-log-reader-rolebinding.yaml
index 9a2ff79bc8..bf6da865a4 100644
--- a/chart/templates/rbac/pod-log-reader-rolebinding.yaml
+++ b/chart/templates/rbac/pod-log-reader-rolebinding.yaml
@@ -26,35 +26,35 @@ kind: RoleBinding
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
metadata:
-{{- if not .Values.multiNamespaceMode }}
+ {{- if not .Values.multiNamespaceMode }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
name: {{ .Release.Name }}-pod-log-reader-rolebinding
labels:
tier: airflow
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
-{{- if .Values.multiNamespaceMode }}
+ {{- if .Values.multiNamespaceMode }}
kind: ClusterRole
-{{- else }}
+ {{- else }}
kind: Role
-{{- end }}
+ {{- end }}
name: {{ .Release.Name }}-pod-log-reader-role
subjects:
-{{- if .Values.webserver.allowPodLogReading }}
+ {{- if .Values.webserver.allowPodLogReading }}
- kind: ServiceAccount
name: {{ include "webserver.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
-{{- if .Values.triggerer.enabled }}
+ {{- end }}
+ {{- if .Values.triggerer.enabled }}
- kind: ServiceAccount
name: {{ include "triggerer.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/rbac/security-context-constraint-rolebinding.yaml b/chart/templates/rbac/security-context-constraint-rolebinding.yaml
index 97ea52ea58..c4d5c40f4b 100644
--- a/chart/templates/rbac/security-context-constraint-rolebinding.yaml
+++ b/chart/templates/rbac/security-context-constraint-rolebinding.yaml
@@ -27,18 +27,18 @@ kind: RoleBinding
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
metadata:
-{{- if not .Values.multiNamespaceMode }}
+ {{- if not .Values.multiNamespaceMode }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
name: {{ .Release.Name }}-scc-rolebinding
labels:
tier: airflow
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -47,40 +47,40 @@ subjects:
- kind: ServiceAccount
name: {{ include "webserver.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- if $hasWorkers }}
+ {{- if $hasWorkers }}
- kind: ServiceAccount
name: {{ include "worker.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
- kind: ServiceAccount
name: {{ include "scheduler.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- if and .Values.statsd.enabled }}
+ {{- if and .Values.statsd.enabled }}
- kind: ServiceAccount
name: {{ include "statsd.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
-{{- if and .Values.flower.enabled (or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor")) }}
+ {{- end }}
+ {{- if and .Values.flower.enabled (or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor")) }}
- kind: ServiceAccount
name: {{ include "flower.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end}}
-{{- if and (semverCompare ">=2.2.0" .Values.airflowVersion) }}
+ {{- end}}
+ {{- if and (semverCompare ">=2.2.0" .Values.airflowVersion) }}
- kind: ServiceAccount
name: {{ include "triggerer.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
- kind: ServiceAccount
name: {{ include "migrateDatabaseJob.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- if .Values.webserver.defaultUser.enabled }}
+ {{- if .Values.webserver.defaultUser.enabled }}
- kind: ServiceAccount
name: {{ include "createUserJob.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
-{{- if and .Values.cleanup.enabled }}
+ {{- end }}
+ {{- if and .Values.cleanup.enabled }}
- kind: ServiceAccount
name: {{ include "cleanup.serviceAccountName" . }}
namespace: "{{ .Release.Namespace }}"
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/resourcequota.yaml b/chart/templates/resourcequota.yaml
index 04d59290da..91b08727cd 100644
--- a/chart/templates/resourcequota.yaml
+++ b/chart/templates/resourcequota.yaml
@@ -29,10 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
- hard:
-{{ toYaml .Values.quotas | indent 4 }}
+ hard: {{- toYaml .Values.quotas | nindent 4 }}
{{- end }}
diff --git a/chart/templates/scheduler/scheduler-deployment.yaml b/chart/templates/scheduler/scheduler-deployment.yaml
index 7504c37a15..82ab43fd5d 100644
--- a/chart/templates/scheduler/scheduler-deployment.yaml
+++ b/chart/templates/scheduler/scheduler-deployment.yaml
@@ -36,7 +36,6 @@
{{- $topologySpreadConstraints := or .Values.scheduler.topologySpreadConstraints .Values.topologySpreadConstraints }}
{{- $revisionHistoryLimit := or .Values.scheduler.revisionHistoryLimit .Values.revisionHistoryLimit }}
{{- $securityContext := include "airflowSecurityContext" (list . .Values.scheduler) }}
-
kind: {{ if $stateful }}StatefulSet{{ else }}Deployment{{ end }}
apiVersion: apps/v1
metadata:
@@ -48,28 +47,25 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
executor: {{ .Values.executor }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
{{- if .Values.scheduler.annotations }}
- annotations:
- {{- toYaml .Values.scheduler.annotations | nindent 4 }}
+ annotations: {{- toYaml .Values.scheduler.annotations | nindent 4 }}
{{- end }}
spec:
-{{- if $stateful }}
+ {{- if $stateful }}
serviceName: {{ .Release.Name }}-scheduler
-{{- end }}
+ {{- end }}
replicas: {{ .Values.scheduler.replicas }}
{{- if $revisionHistoryLimit }}
revisionHistoryLimit: {{ $revisionHistoryLimit }}
{{- end }}
{{- if and $stateful .Values.scheduler.updateStrategy }}
- updateStrategy:
- {{- toYaml .Values.scheduler.updateStrategy | nindent 4 }}
+ updateStrategy: {{- toYaml .Values.scheduler.updateStrategy | nindent 4 }}
{{- end }}
{{- if and (not $stateful) .Values.scheduler.strategy }}
- strategy:
- {{- toYaml .Values.scheduler.strategy | nindent 4 }}
+ strategy: {{- toYaml .Values.scheduler.strategy | nindent 4 }}
{{- end }}
selector:
matchLabels:
@@ -82,9 +78,9 @@ spec:
tier: airflow
component: scheduler
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.scheduler.labels) }}
-{{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.scheduler.labels) }}
+ {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
annotations:
checksum/metadata-secret: {{ include (print $.Template.BasePath "/secrets/metadata-connection-secret.yaml") . | sha256sum }}
checksum/result-backend-secret: {{ include (print $.Template.BasePath "/secrets/result-backend-connection-secret.yaml") . | sha256sum }}
@@ -96,21 +92,20 @@ spec:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
{{- end }}
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.scheduler.podAnnotations }}
- {{- toYaml .Values.scheduler.podAnnotations | nindent 8 }}
+ {{- toYaml .Values.scheduler.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.scheduler.priorityClassName }}
priorityClassName: {{ .Values.scheduler.priorityClassName }}
{{- end }}
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
-{{- if $affinity }}
-{{ toYaml $affinity | indent 8 }}
-{{- else }}
+ {{- if $affinity }}
+ {{- toYaml $affinity | nindent 8 }}
+ {{- else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
@@ -119,11 +114,9 @@ spec:
component: scheduler
topologyKey: kubernetes.io/hostname
weight: 100
-{{- end }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ {{- end }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
restartPolicy: Always
terminationGracePeriodSeconds: 10
serviceAccountName: {{ include "scheduler.serviceAccountName" . }}
@@ -139,37 +132,34 @@ spec:
initContainers:
{{- if .Values.scheduler.waitForMigrations.enabled }}
- name: wait-for-airflow-migrations
- resources:
-{{ toYaml .Values.scheduler.resources | indent 12 }}
+ resources: {{- toYaml .Values.scheduler.resources | nindent 12 }}
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.scheduler.extraVolumeMounts }}
-{{ toYaml .Values.scheduler.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- args:
- {{- include "wait-for-migrations-command" . | indent 10 }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.scheduler.extraVolumeMounts }}
+ {{- toYaml .Values.scheduler.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ args: {{- include "wait-for-migrations-command" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
-{{- if .Values.scheduler.waitForMigrations.env }}
-{{ tpl (toYaml .Values.scheduler.waitForMigrations.env) $ | indent 12 }}
-{{- end }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- if .Values.scheduler.waitForMigrations.env }}
+ {{- tpl (toYaml .Values.scheduler.waitForMigrations.env) $ | nindent 12 }}
+ {{- end }}
{{- end }}
{{- if and $localOrDagProcessorDisabled .Values.dags.gitSync.enabled }}
- {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
+ {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
{{- end }}
{{- if .Values.scheduler.extraInitContainers }}
- {{- toYaml .Values.scheduler.extraInitContainers | nindent 8 }}
+ {{- toYaml .Values.scheduler.extraInitContainers | nindent 8 }}
{{- end }}
containers:
# Always run the main scheduler container.
@@ -182,12 +172,11 @@ spec:
{{- if .Values.scheduler.args }}
args: {{ tpl (toYaml .Values.scheduler.args) . | nindent 12 }}
{{- end }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
- {{- include "container_extra_envs" (list . .Values.scheduler.env) | indent 10 }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- include "container_extra_envs" (list . .Values.scheduler.env) | indent 10 }}
livenessProbe:
initialDelaySeconds: {{ .Values.scheduler.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.scheduler.livenessProbe.timeoutSeconds }}
@@ -196,9 +185,9 @@ spec:
exec:
command:
{{- if .Values.scheduler.livenessProbe.command }}
- {{ toYaml .Values.scheduler.livenessProbe.command | nindent 16 }}
+ {{- toYaml .Values.scheduler.livenessProbe.command | nindent 16 }}
{{- else}}
- {{- include "scheduler_liveness_check_command" . | nindent 16 }}
+ {{- include "scheduler_liveness_check_command" . | nindent 16 }}
{{- end }}
{{- if and $local (not $elasticsearch) }}
# Serve logs if we're in local mode and we don't have elasticsearch enabled.
@@ -206,8 +195,7 @@ spec:
- name: worker-logs
containerPort: {{ .Values.ports.workerLogs }}
{{- end }}
- resources:
-{{ toYaml .Values.scheduler.resources | indent 12 }}
+ resources: {{- toYaml .Values.scheduler.resources | nindent 12 }}
volumeMounts:
{{- if semverCompare ">=1.10.12" .Values.airflowVersion }}
- name: config
@@ -217,33 +205,32 @@ spec:
{{- end }}
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
-{{- if and $localOrDagProcessorDisabled (or .Values.dags.persistence.enabled .Values.dags.gitSync.enabled) }}
-{{- include "airflow_dags_mount" . | nindent 12 }}
-{{- end }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.scheduler.extraVolumeMounts }}
-{{ toYaml .Values.scheduler.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if and $localOrDagProcessorDisabled .Values.dags.gitSync.enabled }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ {{- if and $localOrDagProcessorDisabled (or .Values.dags.persistence.enabled .Values.dags.gitSync.enabled) }}
+ {{- include "airflow_dags_mount" . | nindent 12 }}
+ {{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.scheduler.extraVolumeMounts }}
+ {{- toYaml .Values.scheduler.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if and $localOrDagProcessorDisabled .Values.dags.gitSync.enabled }}
{{- include "git_sync_container" . | indent 8 }}
-{{- end }}
+ {{- end }}
{{- if .Values.scheduler.logGroomerSidecar.enabled }}
- name: scheduler-log-groomer
- resources:
-{{ toYaml .Values.scheduler.logGroomerSidecar.resources | indent 12 }}
+ resources: {{- toYaml .Values.scheduler.logGroomerSidecar.resources | nindent 12 }}
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
{{- if .Values.scheduler.logGroomerSidecar.command }}
command: {{ tpl (toYaml .Values.scheduler.logGroomerSidecar.command) . | nindent 12 }}
{{- end }}
{{- if .Values.scheduler.logGroomerSidecar.args }}
- args: {{ tpl (toYaml .Values.scheduler.logGroomerSidecar.args) . | nindent 12 }}
+ args: {{- tpl (toYaml .Values.scheduler.logGroomerSidecar.args) . | nindent 12 }}
{{- end }}
{{ if .Values.scheduler.logGroomerSidecar.retentionDays }}
env:
@@ -253,19 +240,19 @@ spec:
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.scheduler.extraVolumeMounts }}
-{{ toYaml .Values.scheduler.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.scheduler.extraVolumeMounts }}
+ {{- toYaml .Values.scheduler.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
{{- end }}
-{{- if .Values.scheduler.extraContainers }}
-{{- toYaml .Values.scheduler.extraContainers | nindent 8 }}
-{{- end }}
+ {{- if .Values.scheduler.extraContainers }}
+ {{- toYaml .Values.scheduler.extraContainers | nindent 8 }}
+ {{- end }}
volumes:
- name: config
configMap:
@@ -275,7 +262,7 @@ spec:
configMap:
name: {{ template "airflow_webserver_config_configmap_name" . }}
{{- end }}
-{{- if $localOrDagProcessorDisabled }}
+ {{- if $localOrDagProcessorDisabled }}
{{- if .Values.dags.persistence.enabled }}
- name: dags
persistentVolumeClaim:
@@ -286,28 +273,27 @@ spec:
{{- if .Values.dags.gitSync.sshKeySecret }}
{{- include "git_sync_ssh_key_volume" . | indent 8 }}
{{- end }}
- {{- end}}
-{{- end }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.scheduler.extraVolumes }}
-{{ toYaml .Values.scheduler.extraVolumes | indent 8 }}
-{{- end }}
-{{- if .Values.logs.persistence.enabled }}
+ {{- end }}
+ {{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.scheduler.extraVolumes }}
+ {{- toYaml .Values.scheduler.extraVolumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.logs.persistence.enabled }}
- name: logs
persistentVolumeClaim:
claimName: {{ template "airflow_logs_volume_claim" . }}
-{{- else if not $stateful }}
+ {{- else if not $stateful }}
- name: logs
emptyDir: {}
-{{- else }}
+ {{- else }}
volumeClaimTemplates:
- metadata:
name: logs
{{- if .Values.workers.persistence.annotations }}
- annotations:
- {{- toYaml .Values.workers.persistence.annotations | nindent 10 }}
+ annotations: {{- toYaml .Values.workers.persistence.annotations | nindent 10 }}
{{- end }}
spec:
{{- if .Values.workers.persistence.storageClassName }}
@@ -317,4 +303,4 @@ spec:
resources:
requests:
storage: {{ .Values.workers.persistence.size }}
-{{- end }}
+ {{- end }}
diff --git a/chart/templates/scheduler/scheduler-networkpolicy.yaml b/chart/templates/scheduler/scheduler-networkpolicy.yaml
index a65d43b454..d92a35c484 100644
--- a/chart/templates/scheduler/scheduler-networkpolicy.yaml
+++ b/chart/templates/scheduler/scheduler-networkpolicy.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.scheduler.labels) }}
-{{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.scheduler.labels) }}
+ {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
@@ -40,7 +40,7 @@ spec:
release: {{ .Release.Name }}
policyTypes:
- Ingress
-{{- if eq .Values.executor "LocalExecutor" }}
+ {{- if eq .Values.executor "LocalExecutor" }}
ingress:
- from:
- podSelector:
@@ -51,5 +51,5 @@ spec:
ports:
- protocol: TCP
port: {{ .Values.ports.workerLogs }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/scheduler/scheduler-poddisruptionbudget.yaml b/chart/templates/scheduler/scheduler-poddisruptionbudget.yaml
index 5f634b93bc..b8656f654d 100644
--- a/chart/templates/scheduler/scheduler-poddisruptionbudget.yaml
+++ b/chart/templates/scheduler/scheduler-poddisruptionbudget.yaml
@@ -33,9 +33,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.scheduler.labels) }}
-{{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.scheduler.labels) }}
+ {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
diff --git a/chart/templates/scheduler/scheduler-service.yaml b/chart/templates/scheduler/scheduler-service.yaml
index b99fd84bc6..c6c14e87ce 100644
--- a/chart/templates/scheduler/scheduler-service.yaml
+++ b/chart/templates/scheduler/scheduler-service.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.scheduler.labels) }}
-{{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.scheduler.labels) }}
+ {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
clusterIP: None
selector:
diff --git a/chart/templates/scheduler/scheduler-serviceaccount.yaml b/chart/templates/scheduler/scheduler-serviceaccount.yaml
index 8d851f24af..045317d646 100644
--- a/chart/templates/scheduler/scheduler-serviceaccount.yaml
+++ b/chart/templates/scheduler/scheduler-serviceaccount.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.scheduler.labels) }}
-{{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.scheduler.labels) }}
+ {{- mustMerge .Values.scheduler.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.scheduler.serviceAccount.annotations }}
annotations:
{{- range $key, $value := . }}
diff --git a/chart/templates/secrets/elasticsearch-secret.yaml b/chart/templates/secrets/elasticsearch-secret.yaml
index e4b348d32b..52be138261 100644
--- a/chart/templates/secrets/elasticsearch-secret.yaml
+++ b/chart/templates/secrets/elasticsearch-secret.yaml
@@ -27,9 +27,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
{{- with .Values.elasticsearch.connection }}
@@ -38,5 +38,5 @@ data:
{{- else }}
connection: {{ urlJoin (dict "scheme" (default "http" .scheme) "host" (printf "%s:%s" .host ((default 9200 .port) | toString))) | b64enc | quote }}
{{- end }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/secrets/extra-secrets.yaml b/chart/templates/secrets/extra-secrets.yaml
index 40c56306f2..f528f20d24 100644
--- a/chart/templates/secrets/extra-secrets.yaml
+++ b/chart/templates/secrets/extra-secrets.yaml
@@ -29,12 +29,12 @@ metadata:
release: {{ $Global.Release.Name }}
chart: "{{ $Global.Chart.Name }}-{{ $Global.Chart.Version }}"
heritage: {{ $Global.Release.Service }}
-{{- with $Global.Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
-{{- if $secretContent.labels }}
-{{ toYaml $secretContent.labels | indent 4 }}
-{{- end }}
+ {{- with $Global.Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- if $secretContent.labels }}
+ {{- toYaml $secretContent.labels | nindent 4 }}
+ {{- end }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-delete-policy": "before-hook-creation"
@@ -45,13 +45,13 @@ type: {{ $secretContent.type }}
{{- if $secretContent.data }}
data:
{{- with $secretContent.data }}
- {{- tpl . $Global | nindent 2 }}
+ {{- tpl . $Global | nindent 2 }}
{{- end }}
{{- end }}
{{- if $secretContent.stringData }}
stringData:
{{- with $secretContent.stringData }}
- {{- tpl . $Global | nindent 2 }}
+ {{- tpl . $Global | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/secrets/fernetkey-secret.yaml b/chart/templates/secrets/fernetkey-secret.yaml
index f17652bbb0..b4441fa2ff 100644
--- a/chart/templates/secrets/fernetkey-secret.yaml
+++ b/chart/templates/secrets/fernetkey-secret.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
diff --git a/chart/templates/secrets/flower-secret.yaml b/chart/templates/secrets/flower-secret.yaml
index c88734dc4d..d8152571f8 100644
--- a/chart/templates/secrets/flower-secret.yaml
+++ b/chart/templates/secrets/flower-secret.yaml
@@ -27,9 +27,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
basicAuth: {{ (printf "%s:%s" .Values.flower.username .Values.flower.password) | b64enc | quote }}
diff --git a/chart/templates/secrets/kerberos-keytab-secret.yaml b/chart/templates/secrets/kerberos-keytab-secret.yaml
index e41a9e259e..b931dd696e 100644
--- a/chart/templates/secrets/kerberos-keytab-secret.yaml
+++ b/chart/templates/secrets/kerberos-keytab-secret.yaml
@@ -25,9 +25,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
data:
kerberos.keytab: {{ .Values.kerberos.keytabBase64Content }}
kind: Secret
diff --git a/chart/templates/secrets/metadata-connection-secret.yaml b/chart/templates/secrets/metadata-connection-secret.yaml
index de7df1cd6c..f6e09be7fe 100644
--- a/chart/templates/secrets/metadata-connection-secret.yaml
+++ b/chart/templates/secrets/metadata-connection-secret.yaml
@@ -36,9 +36,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
{{- with .Values.data.metadataConnection }}
diff --git a/chart/templates/secrets/pgbouncer-certificates-secret.yaml b/chart/templates/secrets/pgbouncer-certificates-secret.yaml
index d9f1f2d59b..6b8fd00486 100644
--- a/chart/templates/secrets/pgbouncer-certificates-secret.yaml
+++ b/chart/templates/secrets/pgbouncer-certificates-secret.yaml
@@ -27,18 +27,18 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
-{{- if .Values.pgbouncer.ssl.ca }}
+ {{- if .Values.pgbouncer.ssl.ca }}
root.crt: {{ .Values.pgbouncer.ssl.ca | b64enc }}
-{{- end }}
-{{- if .Values.pgbouncer.ssl.cert }}
+ {{- end }}
+ {{- if .Values.pgbouncer.ssl.cert }}
server.crt: {{ .Values.pgbouncer.ssl.cert | b64enc }}
-{{- end }}
-{{- if .Values.pgbouncer.ssl.key }}
+ {{- end }}
+ {{- if .Values.pgbouncer.ssl.key }}
server.key: {{ .Values.pgbouncer.ssl.key | b64enc }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/secrets/pgbouncer-config-secret.yaml b/chart/templates/secrets/pgbouncer-config-secret.yaml
index ca1d316d9c..1904a6804b 100644
--- a/chart/templates/secrets/pgbouncer-config-secret.yaml
+++ b/chart/templates/secrets/pgbouncer-config-secret.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
pgbouncer.ini: {{ include "pgbouncer_config" . | b64enc }}
diff --git a/chart/templates/secrets/pgbouncer-stats-secret.yaml b/chart/templates/secrets/pgbouncer-stats-secret.yaml
index 9b86f6ed72..530ddd6b7b 100644
--- a/chart/templates/secrets/pgbouncer-stats-secret.yaml
+++ b/chart/templates/secrets/pgbouncer-stats-secret.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
connection: {{ urlJoin (dict "scheme" "postgresql" "userinfo" (printf "%s:%s" (.Values.data.metadataConnection.user | urlquery) (.Values.data.metadataConnection.pass | urlquery) ) "host" (printf "127.0.0.1:%s" (.Values.ports.pgbouncer | toString)) "path" "/pgbouncer" "query" (printf "sslmode=%s" (.Values.pgbouncer.metricsExporterSidecar.sslmode | toString ))) | b64enc | quote }}
diff --git a/chart/templates/secrets/redis-secrets.yaml b/chart/templates/secrets/redis-secrets.yaml
index 44745bfbcf..836af92a04 100644
--- a/chart/templates/secrets/redis-secrets.yaml
+++ b/chart/templates/secrets/redis-secrets.yaml
@@ -38,9 +38,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook-delete-policy": "before-hook-creation"
@@ -65,7 +65,7 @@ metadata:
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{ toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": "pre-install"
@@ -73,9 +73,9 @@ metadata:
"helm.sh/hook-weight": "0"
type: Opaque
data:
-{{- if .Values.redis.enabled }}
+ {{- if .Values.redis.enabled }}
connection: {{ urlJoin (dict "scheme" "redis" "userinfo" (printf ":%s" ((default $random_redis_password .Values.redis.password) | urlquery)) "host" (printf "%s-redis:6379" .Release.Name ) "path" "/0") | b64enc | quote }}
-{{- else }}
+ {{- else }}
connection: {{ (printf "%s" .Values.data.brokerUrl) | b64enc | quote }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/secrets/registry-secret.yaml b/chart/templates/secrets/registry-secret.yaml
index 7a3d7bb06e..bdcfe1dd4e 100644
--- a/chart/templates/secrets/registry-secret.yaml
+++ b/chart/templates/secrets/registry-secret.yaml
@@ -27,9 +27,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ include "registry_docker_config" . | b64enc }}
diff --git a/chart/templates/secrets/result-backend-connection-secret.yaml b/chart/templates/secrets/result-backend-connection-secret.yaml
index 1c66367e02..ce77c7505a 100644
--- a/chart/templates/secrets/result-backend-connection-secret.yaml
+++ b/chart/templates/secrets/result-backend-connection-secret.yaml
@@ -22,7 +22,6 @@
{{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
{{- if or (semverCompare "<2.4.0" .Values.airflowVersion) (and (semverCompare ">=2.4.0" .Values.airflowVersion) .Values.data.resultBackendConnection) }}
{{- $connection := .Values.data.resultBackendConnection | default .Values.data.metadataConnection }}
-
{{- $resultBackendHost := $connection.host | default (printf "%s-%s" .Release.Name "postgresql") }}
{{- $pgbouncerHost := printf "%s-%s" .Release.Name "pgbouncer" }}
{{- $host := ternary $pgbouncerHost $resultBackendHost .Values.pgbouncer.enabled }}
@@ -38,9 +37,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
connection: {{ urlJoin (dict "scheme" (printf "db+%s" $connection.protocol) "userinfo" (printf "%s:%s" ($connection.user|urlquery) ($connection.pass | urlquery)) "host" (printf "%s:%s" $host $port) "path" (printf "/%s" $database) "query" $query) | b64enc | quote }}
diff --git a/chart/templates/secrets/webserver-secret-key-secret.yaml b/chart/templates/secrets/webserver-secret-key-secret.yaml
index 2e5ee8b205..4337c273c9 100644
--- a/chart/templates/secrets/webserver-secret-key-secret.yaml
+++ b/chart/templates/secrets/webserver-secret-key-secret.yaml
@@ -30,9 +30,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
type: Opaque
data:
webserver-secret-key: {{ (default $generated_secret_key .Values.webserverSecretKey) | b64enc | quote }}
diff --git a/chart/templates/triggerer/triggerer-deployment.yaml b/chart/templates/triggerer/triggerer-deployment.yaml
index d7771c18c2..58e468e7fc 100644
--- a/chart/templates/triggerer/triggerer-deployment.yaml
+++ b/chart/templates/triggerer/triggerer-deployment.yaml
@@ -39,11 +39,10 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
{{- with .Values.labels }}
- {{- toYaml . | nindent 4 }}
+ {{- toYaml . | nindent 4 }}
{{- end }}
{{- if .Values.triggerer.annotations }}
- annotations:
- {{- toYaml .Values.triggerer.annotations | nindent 4 }}
+ annotations: {{- toYaml .Values.triggerer.annotations | nindent 4 }}
{{- end }}
spec:
{{- if $persistence }}
@@ -59,12 +58,10 @@ spec:
component: triggerer
release: {{ .Release.Name }}
{{- if and $persistence .Values.triggerer.updateStrategy }}
- updateStrategy:
- {{- toYaml .Values.triggerer.updateStrategy | nindent 4 }}
+ updateStrategy: {{- toYaml .Values.triggerer.updateStrategy | nindent 4 }}
{{- end }}
{{- if and (not $persistence) (.Values.triggerer.strategy) }}
- strategy:
- {{- toYaml .Values.triggerer.strategy | nindent 4 }}
+ strategy: {{- toYaml .Values.triggerer.strategy | nindent 4 }}
{{- end }}
template:
metadata:
@@ -72,9 +69,9 @@ spec:
tier: airflow
component: triggerer
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.triggerer.labels) }}
-{{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.triggerer.labels) }}
+ {{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
annotations:
checksum/metadata-secret: {{ include (print $.Template.BasePath "/secrets/metadata-connection-secret.yaml") . | sha256sum }}
checksum/pgbouncer-config-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-config-secret.yaml") . | sha256sum }}
@@ -85,21 +82,20 @@ spec:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
{{- end }}
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.triggerer.podAnnotations }}
- {{- toYaml .Values.triggerer.podAnnotations | nindent 8 }}
+ {{- toYaml .Values.triggerer.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.triggerer.priorityClassName }}
priorityClassName: {{ .Values.triggerer.priorityClassName }}
{{- end }}
- nodeSelector:
- {{- toYaml $nodeSelector | nindent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
- {{- if $affinity }}
- {{- toYaml $affinity | nindent 8 }}
- {{- else }}
+ {{- if $affinity }}
+ {{- toYaml $affinity | nindent 8 }}
+ {{- else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
@@ -108,11 +104,9 @@ spec:
component: triggerer
topologyKey: kubernetes.io/hostname
weight: 100
- {{- end }}
- tolerations:
- {{- toYaml $tolerations | nindent 8 }}
- topologySpreadConstraints:
- {{- toYaml $topologySpreadConstraints | nindent 8 }}
+ {{- end }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
terminationGracePeriodSeconds: {{ .Values.triggerer.terminationGracePeriodSeconds }}
restartPolicy: Always
serviceAccountName: {{ include "triggerer.serviceAccountName" . }}
@@ -129,32 +123,30 @@ spec:
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
- {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.triggerer.extraVolumeMounts }}
- {{ toYaml .Values.triggerer.extraVolumeMounts | nindent 12 }}
+ {{- toYaml .Values.triggerer.extraVolumeMounts | nindent 12 }}
{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- args:
- {{- include "wait-for-migrations-command" . | nindent 10 }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | nindent 10 }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ args: {{- include "wait-for-migrations-command" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | nindent 10 }}
- {{- include "standard_airflow_environment" . | nindent 10 }}
-{{- if .Values.triggerer.waitForMigrations.env }}
-{{ tpl (toYaml .Values.triggerer.waitForMigrations.env) $ | indent 12 }}
-{{- end }}
+ {{- include "custom_airflow_environment" . | nindent 10 }}
+ {{- include "standard_airflow_environment" . | nindent 10 }}
+ {{- if .Values.triggerer.waitForMigrations.env }}
+ {{- tpl (toYaml .Values.triggerer.waitForMigrations.env) $ | nindent 12 }}
+ {{- end }}
{{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
- {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
+ {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
{{- end }}
{{- if .Values.triggerer.extraInitContainers }}
- {{- toYaml .Values.triggerer.extraInitContainers | nindent 8 }}
+ {{- toYaml .Values.triggerer.extraInitContainers | nindent 8 }}
{{- end }}
containers:
- name: triggerer
@@ -166,30 +158,28 @@ spec:
{{- if .Values.triggerer.args }}
args: {{ tpl (toYaml .Values.triggerer.args) . | nindent 12 }}
{{- end }}
- resources:
- {{ toYaml .Values.triggerer.resources | nindent 12 }}
+ resources: {{- toYaml .Values.triggerer.resources | nindent 12 }}
volumeMounts:
{{- if .Values.volumeMounts }}
- {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end }}
{{- if .Values.triggerer.extraVolumeMounts }}
- {{ toYaml .Values.triggerer.extraVolumeMounts | nindent 12 }}
+ {{- toYaml .Values.triggerer.extraVolumeMounts | nindent 12 }}
{{- end }}
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
{{- if or .Values.dags.persistence.enabled .Values.dags.gitSync.enabled }}
- {{- include "airflow_dags_mount" . | nindent 12 }}
+ {{- include "airflow_dags_mount" . | nindent 12 }}
{{- end }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | nindent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | nindent 10 }}
- {{- include "standard_airflow_environment" . | nindent 10 }}
- {{- include "container_extra_envs" (list . .Values.triggerer.env) | indent 10 }}
+ {{- include "custom_airflow_environment" . | nindent 10 }}
+ {{- include "standard_airflow_environment" . | nindent 10 }}
+ {{- include "container_extra_envs" (list . .Values.triggerer.env) | nindent 10 }}
livenessProbe:
initialDelaySeconds: {{ .Values.triggerer.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.triggerer.livenessProbe.timeoutSeconds }}
@@ -198,32 +188,31 @@ spec:
exec:
command:
{{- if .Values.triggerer.livenessProbe.command }}
- {{ toYaml .Values.triggerer.livenessProbe.command | nindent 16 }}
+ {{- toYaml .Values.triggerer.livenessProbe.command | nindent 16 }}
{{- else }}
- {{- include "triggerer_liveness_check_command" . | nindent 16 }}
+ {{- include "triggerer_liveness_check_command" . | nindent 16 }}
{{- end }}
{{- /* Airflow version 2.6.0 is when triggerer logs serve introduced */ -}}
- {{- if semverCompare ">=2.6.0" .Values.airflowVersion }}
+ {{- if semverCompare ">=2.6.0" .Values.airflowVersion }}
ports:
- name: triggerer-logs
containerPort: {{ .Values.ports.triggererLogs }}
- {{- end }}
+ {{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
- {{- include "git_sync_container" . | indent 8 }}
+ {{- include "git_sync_container" . | nindent 8 }}
{{- end }}
{{- if .Values.triggerer.logGroomerSidecar.enabled }}
- name: triggerer-log-groomer
- resources:
-{{ toYaml .Values.triggerer.logGroomerSidecar.resources | indent 12 }}
+ resources: {{- toYaml .Values.triggerer.logGroomerSidecar.resources | nindent 12 }}
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
{{- if .Values.triggerer.logGroomerSidecar.command }}
command: {{ tpl (toYaml .Values.triggerer.logGroomerSidecar.command) . | nindent 12 }}
{{- end }}
{{- if .Values.triggerer.logGroomerSidecar.args }}
- args: {{ tpl (toYaml .Values.triggerer.logGroomerSidecar.args) . | nindent 12 }}
+ args: {{- tpl (toYaml .Values.triggerer.logGroomerSidecar.args) . | nindent 12 }}
{{- end }}
- {{ if .Values.triggerer.logGroomerSidecar.retentionDays }}
+ {{- if .Values.triggerer.logGroomerSidecar.retentionDays }}
env:
- name: AIRFLOW__LOG_RETENTION_DAYS
value: "{{ .Values.triggerer.logGroomerSidecar.retentionDays }}"
@@ -231,18 +220,18 @@ spec:
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- if .Values.volumeMounts }}
-{{ toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.triggerer.extraVolumeMounts }}
-{{ toYaml .Values.triggerer.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.triggerer.extraVolumeMounts }}
+ {{- toYaml .Values.triggerer.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
{{- end }}
{{- if .Values.triggerer.extraContainers }}
- {{- toYaml .Values.triggerer.extraContainers | nindent 8 }}
+ {{- toYaml .Values.triggerer.extraContainers | nindent 8 }}
{{- end }}
volumes:
- name: config
@@ -261,29 +250,28 @@ spec:
- name: dags
emptyDir: {}
{{- if .Values.dags.gitSync.sshKeySecret }}
- {{- include "git_sync_ssh_key_volume" . | indent 8 }}
+ {{- include "git_sync_ssh_key_volume" . | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.volumes }}
- {{- toYaml .Values.volumes | nindent 8 }}
+ {{- toYaml .Values.volumes | nindent 8 }}
{{- end }}
{{- if .Values.triggerer.extraVolumes }}
- {{- toYaml .Values.triggerer.extraVolumes | nindent 8 }}
+ {{- toYaml .Values.triggerer.extraVolumes | nindent 8 }}
{{- end }}
-{{- if .Values.logs.persistence.enabled }}
+ {{- if .Values.logs.persistence.enabled }}
- name: logs
persistentVolumeClaim:
claimName: {{ template "airflow_logs_volume_claim" . }}
-{{- else if not $persistence }}
+ {{- else if not $persistence }}
- name: logs
emptyDir: {}
-{{- else }}
+ {{- else }}
volumeClaimTemplates:
- metadata:
name: logs
{{- if .Values.triggerer.persistence.annotations }}
- annotations:
- {{- toYaml .Values.triggerer.persistence.annotations | nindent 10 }}
+ annotations: {{- toYaml .Values.triggerer.persistence.annotations | nindent 10 }}
{{- end }}
spec:
{{- if .Values.triggerer.persistence.storageClassName }}
@@ -293,6 +281,6 @@ spec:
resources:
requests:
storage: {{ .Values.triggerer.persistence.size }}
-{{- end }}
+ {{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/triggerer/triggerer-networkpolicy.yaml b/chart/templates/triggerer/triggerer-networkpolicy.yaml
index 2d51f2f91a..2458d81a1f 100644
--- a/chart/templates/triggerer/triggerer-networkpolicy.yaml
+++ b/chart/templates/triggerer/triggerer-networkpolicy.yaml
@@ -32,9 +32,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.triggerer.labels) }}
-{{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.triggerer.labels) }}
+ {{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
diff --git a/chart/templates/triggerer/triggerer-service.yaml b/chart/templates/triggerer/triggerer-service.yaml
index 68536b46ec..9832c2c3d4 100644
--- a/chart/templates/triggerer/triggerer-service.yaml
+++ b/chart/templates/triggerer/triggerer-service.yaml
@@ -31,9 +31,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.triggerer.labels) }}
-{{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.triggerer.labels) }}
+ {{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
clusterIP: None
selector:
diff --git a/chart/templates/triggerer/triggerer-serviceaccount.yaml b/chart/templates/triggerer/triggerer-serviceaccount.yaml
index c3836a82bc..f87f7b1b95 100644
--- a/chart/templates/triggerer/triggerer-serviceaccount.yaml
+++ b/chart/templates/triggerer/triggerer-serviceaccount.yaml
@@ -30,12 +30,11 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.triggerer.labels) }}
-{{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.triggerer.labels) }}
+ {{- mustMerge .Values.triggerer.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.triggerer.serviceAccount.annotations}}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
diff --git a/chart/templates/webserver/webserver-deployment.yaml b/chart/templates/webserver/webserver-deployment.yaml
index 23685a874f..1f8fa3f1de 100644
--- a/chart/templates/webserver/webserver-deployment.yaml
+++ b/chart/templates/webserver/webserver-deployment.yaml
@@ -34,13 +34,12 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
-{{- if .Values.webserver.annotations }}
- annotations:
- {{- toYaml .Values.webserver.annotations | nindent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- if .Values.webserver.annotations }}
+ annotations: {{- toYaml .Values.webserver.annotations | nindent 4 }}
+ {{- end }}
spec:
replicas: {{ .Values.webserver.replicas }}
{{- if $revisionHistoryLimit }}
@@ -77,9 +76,9 @@ spec:
tier: airflow
component: webserver
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
annotations:
checksum/metadata-secret: {{ include (print $.Template.BasePath "/secrets/metadata-connection-secret.yaml") . | sha256sum }}
checksum/pgbouncer-config-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-config-secret.yaml") . | sha256sum }}
@@ -89,10 +88,10 @@ spec:
checksum/extra-configmaps: {{ include (print $.Template.BasePath "/configmaps/extra-configmaps.yaml") . | sha256sum }}
checksum/extra-secrets: {{ include (print $.Template.BasePath "/secrets/extra-secrets.yaml") . | sha256sum }}
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.webserver.podAnnotations }}
- {{- toYaml .Values.webserver.podAnnotations | nindent 8 }}
+ {{- toYaml .Values.webserver.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.webserver.hostAliases }}
@@ -103,12 +102,11 @@ spec:
{{- if .Values.webserver.priorityClassName }}
priorityClassName: {{ .Values.webserver.priorityClassName }}
{{- end }}
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
-{{- if $affinity }}
-{{ toYaml $affinity | indent 8 }}
-{{- else }}
+ {{- if $affinity }}
+ {{- toYaml $affinity | nindent 8 }}
+ {{- else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
@@ -117,11 +115,9 @@ spec:
component: webserver
topologyKey: kubernetes.io/hostname
weight: 100
-{{- end }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
+ {{- end }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
restartPolicy: Always
securityContext: {{ $securityContext | nindent 8 }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
@@ -131,37 +127,34 @@ spec:
initContainers:
{{- if .Values.webserver.waitForMigrations.enabled }}
- name: wait-for-airflow-migrations
- resources:
-{{ toYaml .Values.webserver.resources | indent 12 }}
+ resources: {{- toYaml .Values.webserver.resources | nindent 12 }}
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.webserver.extraVolumeMounts }}
-{{ toYaml .Values.webserver.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- args:
- {{- include "wait-for-migrations-command" . | indent 10 }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.webserver.extraVolumeMounts }}
+ {{- toYaml .Values.webserver.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ args: {{- include "wait-for-migrations-command" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
-{{- if .Values.webserver.waitForMigrations.env }}
-{{ tpl (toYaml .Values.webserver.waitForMigrations.env) $ | indent 12 }}
-{{- end }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- if .Values.webserver.waitForMigrations.env }}
+ {{- tpl (toYaml .Values.webserver.waitForMigrations.env) $ | nindent 12 }}
+ {{- end }}
{{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) (semverCompare "<2.0.0" .Values.airflowVersion) }}
- {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
+ {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
{{- end }}
{{- if .Values.webserver.extraInitContainers }}
- {{- toYaml .Values.webserver.extraInitContainers | nindent 8 }}
+ {{- toYaml .Values.webserver.extraInitContainers | nindent 8 }}
{{- end }}
containers:
- name: webserver
@@ -171,34 +164,33 @@ spec:
command: {{ tpl (toYaml .Values.webserver.command) . | nindent 12 }}
{{- end }}
{{- if .Values.webserver.args }}
- args: {{ tpl (toYaml .Values.webserver.args) . | nindent 12 }}
+ args: {{- tpl (toYaml .Values.webserver.args) . | nindent 12 }}
{{- end }}
- resources:
-{{ toYaml .Values.webserver.resources | indent 12 }}
+ resources: {{- toYaml .Values.webserver.resources | nindent 12 }}
volumeMounts:
-{{- if semverCompare ">=1.10.12" .Values.airflowVersion }}
+ {{- if semverCompare ">=1.10.12" .Values.airflowVersion }}
- name: config
mountPath: {{ include "airflow_pod_template_file" . }}/pod_template_file.yaml
subPath: pod_template_file.yaml
readOnly: true
-{{- end }}
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
-{{- if and (semverCompare "<2.0.0" .Values.airflowVersion) (or .Values.dags.gitSync.enabled .Values.dags.persistence.enabled) }}
- {{- include "airflow_dags_mount" . | nindent 12 }}
-{{- end }}
-{{- if .Values.logs.persistence.enabled }}
+ {{- end }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ {{- if and (semverCompare "<2.0.0" .Values.airflowVersion) (or .Values.dags.gitSync.enabled .Values.dags.persistence.enabled) }}
+ {{- include "airflow_dags_mount" . | nindent 12 }}
+ {{- end }}
+ {{- if .Values.logs.persistence.enabled }}
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- end }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.webserver.extraVolumeMounts }}
-{{ toYaml .Values.webserver.extraVolumeMounts | indent 12 }}
-{{- end }}
+ {{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.webserver.extraVolumeMounts }}
+ {{- toYaml .Values.webserver.extraVolumeMounts | nindent 12 }}
+ {{- end }}
ports:
- name: airflow-ui
containerPort: {{ .Values.ports.airflowUI }}
@@ -206,11 +198,11 @@ spec:
httpGet:
path: {{if .Values.config.webserver.base_url }}{{- with urlParse (tpl .Values.config.webserver.base_url .) }}{{ .path }}{{end}}{{end}}/health
port: {{ .Values.ports.airflowUI }}
-{{- if .Values.config.webserver.base_url}}
+ {{- if .Values.config.webserver.base_url}}
httpHeaders:
- name: Host
value: {{ regexReplaceAll ":\\d+$" (urlParse (tpl .Values.config.webserver.base_url .)).host "" }}
-{{- end }}
+ {{- end }}
scheme: {{ .Values.webserver.livenessProbe.scheme | default "http" }}
initialDelaySeconds: {{ .Values.webserver.livenessProbe.initialDelaySeconds | default 15 }}
timeoutSeconds: {{ .Values.webserver.livenessProbe.timeoutSeconds | default 30 }}
@@ -218,30 +210,29 @@ spec:
periodSeconds: {{ .Values.webserver.livenessProbe.periodSeconds | default 5 }}
readinessProbe:
httpGet:
- path: {{if .Values.config.webserver.base_url }}{{- with urlParse (tpl .Values.config.webserver.base_url .) }}{{ .path }}{{end}}{{end}}/health
+ path: {{ if .Values.config.webserver.base_url }}{{- with urlParse (tpl .Values.config.webserver.base_url .) }}{{ .path }}{{ end }}{{ end }}/health
port: {{ .Values.ports.airflowUI }}
-{{- if .Values.config.webserver.base_url}}
+ {{- if .Values.config.webserver.base_url }}
httpHeaders:
- name: Host
value: {{ regexReplaceAll ":\\d+$" (urlParse (tpl .Values.config.webserver.base_url .)).host "" }}
-{{- end }}
+ {{- end }}
scheme: {{ .Values.webserver.readinessProbe.scheme | default "http" }}
initialDelaySeconds: {{ .Values.webserver.readinessProbe.initialDelaySeconds | default 15 }}
timeoutSeconds: {{ .Values.webserver.readinessProbe.timeoutSeconds | default 30 }}
failureThreshold: {{ .Values.webserver.readinessProbe.failureThreshold | default 20 }}
periodSeconds: {{ .Values.webserver.readinessProbe.periodSeconds | default 5 }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
- {{- include "container_extra_envs" (list . .Values.webserver.env) | indent 10 }}
-{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) (semverCompare "<2.0.0" .Values.airflowVersion) }}
-{{- include "git_sync_container" . | indent 8 }}
-{{- end }}
-{{- if .Values.webserver.extraContainers }}
-{{- toYaml .Values.webserver.extraContainers | nindent 8 }}
-{{- end }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- include "container_extra_envs" (list . .Values.webserver.env) | indent 10 }}
+ {{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) (semverCompare "<2.0.0" .Values.airflowVersion) }}
+ {{- include "git_sync_container" . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.webserver.extraContainers }}
+ {{- toYaml .Values.webserver.extraContainers | nindent 8 }}
+ {{- end }}
volumes:
- name: config
configMap:
@@ -260,7 +251,7 @@ spec:
- name: dags
emptyDir: {}
{{- if .Values.dags.gitSync.sshKeySecret }}
- {{- include "git_sync_ssh_key_volume" . | indent 8 }}
+ {{- include "git_sync_ssh_key_volume" . | indent 8 }}
{{- end }}
{{- end }}
{{- end }}
@@ -269,9 +260,9 @@ spec:
persistentVolumeClaim:
claimName: {{ template "airflow_logs_volume_claim" . }}
{{- end }}
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.webserver.extraVolumes }}
-{{ toYaml .Values.webserver.extraVolumes | indent 8 }}
-{{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.webserver.extraVolumes }}
+ {{- toYaml .Values.webserver.extraVolumes | nindent 8 }}
+ {{- end }}
diff --git a/chart/templates/webserver/webserver-ingress.yaml b/chart/templates/webserver/webserver-ingress.yaml
index 6221708d29..169c9256d8 100644
--- a/chart/templates/webserver/webserver-ingress.yaml
+++ b/chart/templates/webserver/webserver-ingress.yaml
@@ -29,12 +29,11 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.ingress.web.annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.web.hosts (.Values.ingress.web.hosts | first | kindIs "string" | not) }}
diff --git a/chart/templates/webserver/webserver-networkpolicy.yaml b/chart/templates/webserver/webserver-networkpolicy.yaml
index 8a2970c933..9166e7615d 100644
--- a/chart/templates/webserver/webserver-networkpolicy.yaml
+++ b/chart/templates/webserver/webserver-networkpolicy.yaml
@@ -30,9 +30,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
@@ -41,10 +41,9 @@ spec:
release: {{ .Release.Name }}
policyTypes:
- Ingress
-{{- if $from }}
+ {{- if $from }}
ingress:
- - from:
-{{ toYaml $from | indent 6 }}
+ - from: {{- toYaml $from | nindent 6 }}
ports:
{{ range .Values.webserver.networkPolicy.ingress.ports }}
-
@@ -52,5 +51,5 @@ spec:
{{ $key }}: {{ tpl (toString $val) $ }}
{{- end }}
{{- end }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/webserver/webserver-poddisruptionbudget.yaml b/chart/templates/webserver/webserver-poddisruptionbudget.yaml
index c96f5a24c5..916374afcd 100644
--- a/chart/templates/webserver/webserver-poddisruptionbudget.yaml
+++ b/chart/templates/webserver/webserver-poddisruptionbudget.yaml
@@ -33,9 +33,9 @@ metadata:
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
selector:
matchLabels:
diff --git a/chart/templates/webserver/webserver-service.yaml b/chart/templates/webserver/webserver-service.yaml
index 52c88c84f2..2468dce4a9 100644
--- a/chart/templates/webserver/webserver-service.yaml
+++ b/chart/templates/webserver/webserver-service.yaml
@@ -28,13 +28,12 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
-{{- with .Values.webserver.service.annotations }}
- annotations:
-{{- toYaml . | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
+ {{- with .Values.webserver.service.annotations }}
+ annotations: {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
type: {{ .Values.webserver.service.type }}
selector:
@@ -51,6 +50,5 @@ spec:
loadBalancerIP: {{ .Values.webserver.service.loadBalancerIP }}
{{- end }}
{{- if .Values.webserver.service.loadBalancerSourceRanges }}
- loadBalancerSourceRanges:
- {{- toYaml .Values.webserver.service.loadBalancerSourceRanges | nindent 4 }}
+ loadBalancerSourceRanges: {{- toYaml .Values.webserver.service.loadBalancerSourceRanges | nindent 4 }}
{{- end }}
diff --git a/chart/templates/webserver/webserver-serviceaccount.yaml b/chart/templates/webserver/webserver-serviceaccount.yaml
index f9d6f25c6a..92cc7d6359 100644
--- a/chart/templates/webserver/webserver-serviceaccount.yaml
+++ b/chart/templates/webserver/webserver-serviceaccount.yaml
@@ -29,11 +29,10 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.webserver.labels) }}
-{{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.webserver.labels) }}
+ {{- mustMerge .Values.webserver.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.webserver.serviceAccount.annotations }}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
diff --git a/chart/templates/workers/worker-deployment.yaml b/chart/templates/workers/worker-deployment.yaml
index 11f7db87d5..2df5ce0c9a 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -37,13 +37,12 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- with .Values.labels }}
-{{ toYaml . | indent 4 }}
-{{- end }}
-{{- if .Values.workers.annotations }}
- annotations:
- {{- toYaml .Values.workers.annotations | nindent 4 }}
-{{- end }}
+ {{- with .Values.labels }}
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+ {{- if .Values.workers.annotations }}
+ annotations: {{- toYaml .Values.workers.annotations | nindent 4 }}
+ {{- end }}
spec:
{{- if $persistence }}
serviceName: {{ .Release.Name }}-worker
@@ -60,12 +59,10 @@ spec:
component: worker
release: {{ .Release.Name }}
{{- if and $persistence .Values.workers.updateStrategy }}
- updateStrategy:
- {{- toYaml .Values.workers.updateStrategy | nindent 4 }}
+ updateStrategy: {{- toYaml .Values.workers.updateStrategy | nindent 4 }}
{{- end }}
{{- if and (not $persistence) (.Values.workers.strategy) }}
- strategy:
- {{- toYaml .Values.workers.strategy | nindent 4 }}
+ strategy: {{- toYaml .Values.workers.strategy | nindent 4 }}
{{- end }}
template:
metadata:
@@ -73,9 +70,9 @@ spec:
tier: airflow
component: worker
release: {{ .Release.Name }}
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 8 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 8 }}
+ {{- end }}
annotations:
checksum/metadata-secret: {{ include (print $.Template.BasePath "/secrets/metadata-connection-secret.yaml") . | sha256sum }}
checksum/result-backend-secret: {{ include (print $.Template.BasePath "/secrets/result-backend-connection-secret.yaml") . | sha256sum }}
@@ -89,21 +86,20 @@ spec:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
{{- end }}
{{- if .Values.airflowPodAnnotations }}
- {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
+ {{- toYaml .Values.airflowPodAnnotations | nindent 8 }}
{{- end }}
{{- if .Values.workers.podAnnotations }}
- {{- toYaml .Values.workers.podAnnotations | nindent 8 }}
+ {{- toYaml .Values.workers.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if .Values.workers.priorityClassName }}
priorityClassName: {{ .Values.workers.priorityClassName }}
{{- end }}
- nodeSelector:
-{{ toYaml $nodeSelector | indent 8 }}
+ nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
-{{- if $affinity }}
-{{ toYaml $affinity | indent 8 }}
-{{- else }}
+ {{- if $affinity }}
+ {{- toYaml $affinity | nindent 8 }}
+ {{- else }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
@@ -112,15 +108,12 @@ spec:
component: worker
topologyKey: kubernetes.io/hostname
weight: 100
-{{- end }}
- tolerations:
-{{ toYaml $tolerations | indent 8 }}
- topologySpreadConstraints:
-{{ toYaml $topologySpreadConstraints | indent 8 }}
-{{- if .Values.workers.hostAliases }}
- hostAliases:
-{{ toYaml .Values.workers.hostAliases | indent 8 }}
-{{- end }}
+ {{- end }}
+ tolerations: {{- toYaml $tolerations | nindent 8 }}
+ topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 8 }}
+ {{- if .Values.workers.hostAliases }}
+ hostAliases: {{- toYaml .Values.workers.hostAliases | nindent 8 }}
+ {{- end }}
terminationGracePeriodSeconds: {{ .Values.workers.terminationGracePeriodSeconds }}
restartPolicy: Always
serviceAccountName: {{ include "worker.serviceAccountName" . }}
@@ -130,10 +123,9 @@ spec:
- name: {{ template "registry_secret" . }}
{{- end }}
initContainers:
- {{- if and $persistence .Values.workers.persistence.fixPermissions }}
+ {{- if and $persistence .Values.workers.persistence.fixPermissions }}
- name: volume-permissions
- resources:
-{{ toYaml .Values.workers.resources | indent 12 }}
+ resources: {{- toYaml .Values.workers.resources | nindent 12 }}
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
command:
@@ -146,38 +138,35 @@ spec:
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
- {{- end }}
+ {{- end }}
- name: wait-for-airflow-migrations
- resources:
-{{ toYaml .Values.workers.resources | indent 12 }}
+ resources: {{- toYaml .Values.workers.resources | nindent 12 }}
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
volumeMounts:
-{{- include "airflow_config_mount" . | nindent 12 }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.workers.extraVolumeMounts }}
-{{ toYaml .Values.workers.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- args:
- {{- include "wait-for-migrations-command" . | indent 10 }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumeMounts }}
+ {{- toYaml .Values.workers.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ args: {{- include "wait-for-migrations-command" . | indent 10 }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
-{{- if .Values.workers.waitForMigrations.env }}
-{{ tpl (toYaml .Values.workers.waitForMigrations.env) $ | indent 12 }}
-{{- end }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- if .Values.workers.waitForMigrations.env }}
+ {{- tpl (toYaml .Values.workers.waitForMigrations.env) $ | nindent 12 }}
+ {{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
- {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
+ {{- include "git_sync_container" (dict "Values" .Values "is_init" "true") | nindent 8 }}
{{- end }}
{{- if .Values.workers.extraInitContainers }}
- {{- toYaml .Values.workers.extraInitContainers | nindent 8 }}
+ {{- toYaml .Values.workers.extraInitContainers | nindent 8 }}
{{- end }}
containers:
- name: worker
@@ -189,8 +178,7 @@ spec:
{{- if .Values.workers.args }}
args: {{ tpl (toYaml .Values.workers.args) . | nindent 12 }}
{{- end }}
- resources:
-{{ toYaml .Values.workers.resources | indent 12 }}
+ resources: {{- toYaml .Values.workers.resources | nindent 12 }}
{{- if .Values.workers.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.workers.livenessProbe.initialDelaySeconds }}
@@ -211,15 +199,15 @@ spec:
- name: worker-logs
containerPort: {{ .Values.ports.workerLogs }}
volumeMounts:
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.workers.extraVolumeMounts }}
-{{ toYaml .Values.workers.extraVolumeMounts | indent 12 }}
-{{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumeMounts }}
+ {{- toYaml .Values.workers.extraVolumeMounts | nindent 12 }}
+ {{- end }}
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- include "airflow_config_mount" . | nindent 12 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.kerberos.enabled }}
- name: kerberos-keytab
subPath: "kerberos.keytab"
@@ -234,30 +222,29 @@ spec:
readOnly: true
{{- end }}
{{- if or .Values.dags.persistence.enabled .Values.dags.gitSync.enabled }}
- {{- include "airflow_dags_mount" . | nindent 12 }}
+ {{- include "airflow_dags_mount" . | nindent 12 }}
{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
env:
# Only signal the main process, not the process group, to make Warm Shutdown work properly
- name: DUMB_INIT_SETSID
value: "0"
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
- {{- include "container_extra_envs" (list . .Values.workers.env) | indent 10 }}
- {{- if .Values.workers.kerberosSidecar.enabled }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- include "container_extra_envs" (list . .Values.workers.env) | indent 10 }}
+ {{- if .Values.workers.kerberosSidecar.enabled }}
- name: KRB5_CONFIG
value: {{ .Values.kerberos.configPath | quote }}
- name: KRB5CCNAME
value: {{ include "kerberos_ccache_path" . | quote }}
- {{- end }}
+ {{- end }}
{{- if and (.Values.dags.gitSync.enabled) (not .Values.dags.persistence.enabled) }}
- {{- include "git_sync_container" . | indent 8 }}
+ {{- include "git_sync_container" . | nindent 8 }}
{{- end }}
-{{- if and $persistence .Values.workers.logGroomerSidecar.enabled }}
+ {{- if and $persistence .Values.workers.logGroomerSidecar.enabled }}
- name: worker-log-groomer
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
@@ -272,32 +259,30 @@ spec:
- name: AIRFLOW__LOG_RETENTION_DAYS
value: "{{ .Values.workers.logGroomerSidecar.retentionDays }}"
{{- end }}
- resources:
-{{ toYaml .Values.workers.logGroomerSidecar.resources | indent 12 }}
+ resources: {{- toYaml .Values.workers.logGroomerSidecar.resources | nindent 12 }}
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.workers.extraVolumeMounts }}
-{{ toYaml .Values.workers.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
-{{- end }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumeMounts }}
+ {{- toYaml .Values.workers.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ {{- end }}
{{- if .Values.workers.kerberosSidecar.enabled }}
- name: worker-kerberos
image: {{ template "airflow_image" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
args: ["kerberos"]
- resources:
-{{ toYaml .Values.workers.kerberosSidecar.resources | indent 12 }}
+ resources: {{- toYaml .Values.workers.kerberosSidecar.resources | nindent 12 }}
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
-{{- include "airflow_config_mount" . | nindent 12 }}
+ {{- include "airflow_config_mount" . | nindent 12 }}
- name: config
mountPath: {{ .Values.kerberos.configPath | quote }}
subPath: krb5.conf
@@ -309,35 +294,34 @@ spec:
- name: kerberos-ccache
mountPath: {{ .Values.kerberos.ccacheMountPath | quote }}
readOnly: false
-{{- if .Values.volumeMounts }}
-{{- toYaml .Values.volumeMounts | nindent 12 }}
-{{- end }}
-{{- if .Values.workers.extraVolumeMounts }}
-{{ toYaml .Values.workers.extraVolumeMounts | indent 12 }}
-{{- end }}
-{{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
-{{ include "airflow_webserver_config_mount" . | indent 12 }}
-{{- end }}
- envFrom:
- {{- include "custom_airflow_environment_from" . | default "\n []" | indent 10 }}
+ {{- if .Values.volumeMounts }}
+ {{- toYaml .Values.volumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumeMounts }}
+ {{- toYaml .Values.workers.extraVolumeMounts | nindent 12 }}
+ {{- end }}
+ {{- if or .Values.webserver.webserverConfig .Values.webserver.webserverConfigConfigMapName }}
+ {{- include "airflow_webserver_config_mount" . | nindent 12 }}
+ {{- end }}
+ envFrom: {{- include "custom_airflow_environment_from" . | default "\n []" | nindent 10 }}
env:
- name: KRB5_CONFIG
value: {{ .Values.kerberos.configPath | quote }}
- name: KRB5CCNAME
value: {{ include "kerberos_ccache_path" . | quote }}
- {{- include "custom_airflow_environment" . | indent 10 }}
- {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- include "custom_airflow_environment" . | indent 10 }}
+ {{- include "standard_airflow_environment" . | indent 10 }}
+ {{- end }}
+ {{- if .Values.workers.extraContainers }}
+ {{- toYaml .Values.workers.extraContainers | nindent 8 }}
{{- end }}
-{{- if .Values.workers.extraContainers }}
-{{- toYaml .Values.workers.extraContainers | nindent 8 }}
-{{- end }}
volumes:
-{{- if .Values.volumes }}
-{{- toYaml .Values.volumes | nindent 8 }}
-{{- end }}
-{{- if .Values.workers.extraVolumes }}
-{{ toYaml .Values.workers.extraVolumes | indent 8 }}
-{{- end }}
+ {{- if .Values.volumes }}
+ {{- toYaml .Values.volumes | nindent 8 }}
+ {{- end }}
+ {{- if .Values.workers.extraVolumes }}
+ {{- toYaml .Values.workers.extraVolumes | nindent 8 }}
+ {{- end }}
- name: config
configMap:
name: {{ template "airflow_config" . }}
@@ -361,31 +345,30 @@ spec:
- name: dags
emptyDir: {}
{{- if .Values.dags.gitSync.sshKeySecret }}
- {{- include "git_sync_ssh_key_volume" . | indent 8 }}
+ {{- include "git_sync_ssh_key_volume" . | indent 8 }}
{{- end }}
{{- end }}
-{{- if .Values.logs.persistence.enabled }}
+ {{- if .Values.logs.persistence.enabled }}
- name: logs
persistentVolumeClaim:
claimName: {{ template "airflow_logs_volume_claim" . }}
-{{- else if not $persistence }}
+ {{- else if not $persistence }}
- name: logs
emptyDir: {}
-{{- else }}
+ {{- else }}
volumeClaimTemplates:
- metadata:
name: logs
{{- if .Values.workers.persistence.annotations }}
- annotations:
- {{- toYaml .Values.workers.persistence.annotations | nindent 10 }}
+ annotations: {{- toYaml .Values.workers.persistence.annotations | nindent 10 }}
{{- end }}
spec:
- {{- if .Values.workers.persistence.storageClassName }}
+ {{- if .Values.workers.persistence.storageClassName }}
storageClassName: {{ .Values.workers.persistence.storageClassName }}
- {{- end }}
+ {{- end }}
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: {{ .Values.workers.persistence.size }}
-{{- end }}
+ {{- end }}
{{- end }}
diff --git a/chart/templates/workers/worker-kedaautoscaler.yaml b/chart/templates/workers/worker-kedaautoscaler.yaml
index 2ec0eda166..49a55f39bc 100644
--- a/chart/templates/workers/worker-kedaautoscaler.yaml
+++ b/chart/templates/workers/worker-kedaautoscaler.yaml
@@ -30,9 +30,9 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
deploymentName: {{ .Release.Name }}-worker
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
scaleTargetRef:
kind: {{ ternary "StatefulSet" "Deployment" .Values.workers.persistence.enabled }}
@@ -41,10 +41,9 @@ spec:
cooldownPeriod: {{ .Values.workers.keda.cooldownPeriod }}
minReplicaCount: {{ .Values.workers.keda.minReplicaCount }}
maxReplicaCount: {{ .Values.workers.keda.maxReplicaCount }}
-{{- if .Values.workers.keda.advanced }}
- advanced:
-{{ toYaml .Values.workers.keda.advanced | indent 4 }}
-{{- end }}
+ {{- if .Values.workers.keda.advanced }}
+ advanced: {{- toYaml .Values.workers.keda.advanced | nindent 4 }}
+ {{- end }}
triggers:
- type: postgresql
metadata:
diff --git a/chart/templates/workers/worker-networkpolicy.yaml b/chart/templates/workers/worker-networkpolicy.yaml
index a0bfc02c21..dab533d19e 100644
--- a/chart/templates/workers/worker-networkpolicy.yaml
+++ b/chart/templates/workers/worker-networkpolicy.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
podSelector:
matchLabels:
diff --git a/chart/templates/workers/worker-service.yaml b/chart/templates/workers/worker-service.yaml
index 170427f12d..d1d3aa38d0 100644
--- a/chart/templates/workers/worker-service.yaml
+++ b/chart/templates/workers/worker-service.yaml
@@ -29,9 +29,9 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
spec:
clusterIP: None
selector:
diff --git a/chart/templates/workers/worker-serviceaccount.yaml b/chart/templates/workers/worker-serviceaccount.yaml
index e55d5d511a..793f85de3c 100644
--- a/chart/templates/workers/worker-serviceaccount.yaml
+++ b/chart/templates/workers/worker-serviceaccount.yaml
@@ -29,11 +29,10 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
-{{- if or (.Values.labels) (.Values.workers.labels) }}
-{{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
-{{- end }}
+ {{- if or (.Values.labels) (.Values.workers.labels) }}
+ {{- mustMerge .Values.workers.labels .Values.labels | toYaml | nindent 4 }}
+ {{- end }}
{{- with .Values.workers.serviceAccount.annotations}}
- annotations:
- {{ toYaml . | nindent 4 }}
+ annotations: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}