Skip to content

Commit

Permalink
Update scheduler-deployment to cope with multiple executors (#46039)
Browse files Browse the repository at this point in the history
  • Loading branch information
krisgeus authored Jan 27, 2025
1 parent 5c5eb7c commit 236a818
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chart/templates/scheduler/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ metadata:
release: {{ .Release.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
heritage: {{ .Release.Service }}
executor: {{ .Values.executor }}
executor: "{{ .Values.executor }}"
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/scheduler/scheduler-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{{- if and .Values.scheduler.enabled .Values.scheduler.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
{{- if eq .Values.executor "CeleryExecutor" }}
{{- if contains "CeleryExecutor" .Values.executor }}
automountServiceAccountToken: {{ .Values.scheduler.serviceAccount.automountServiceAccountToken }}
{{- end }}
metadata:
Expand Down
2 changes: 2 additions & 0 deletions helm_tests/airflow_core/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,7 @@ def test_persistence_volume_annotations(self):
"CeleryExecutor",
"KubernetesExecutor",
"CeleryKubernetesExecutor",
"CeleryExecutor,KubernetesExecutor",
],
)
def test_scheduler_deployment_has_executor_label(self, executor):
Expand Down Expand Up @@ -1021,6 +1022,7 @@ def test_should_add_component_specific_labels(self):
("CeleryKubernetesExecutor", None),
("KubernetesExecutor", None),
("LocalKubernetesExecutor", None),
("CeleryExecutor,KubernetesExecutor", True),
],
)
def test_default_automount_service_account_token(self, executor, default_automount_service_account):
Expand Down

0 comments on commit 236a818

Please sign in to comment.