This is an automated email from the ASF dual-hosted git repository.
jedcunningham 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 8f5c65adeb Chart: Add scheduler name to PODs templates (#33843)
8f5c65adeb is described below
commit 8f5c65adeb63418f704c51303af8dad74c2a4c17
Author: Guilherme Da Silva Gonçalves <[email protected]>
AuthorDate: Fri Sep 8 18:22:04 2023 +0200
Chart: Add scheduler name to PODs templates (#33843)
---
chart/files/pod-template-file.kubernetes-helm-yaml | 3 +++
chart/templates/cleanup/cleanup-cronjob.yaml | 3 +++
chart/templates/dag-processor/dag-processor-deployment.yaml | 3 +++
chart/templates/flower/flower-deployment.yaml | 3 +++
chart/templates/jobs/create-user-job.yaml | 3 +++
chart/templates/jobs/migrate-database-job.yaml | 3 +++
chart/templates/pgbouncer/pgbouncer-deployment.yaml | 3 +++
chart/templates/redis/redis-statefulset.yaml | 3 +++
chart/templates/scheduler/scheduler-deployment.yaml | 3 +++
chart/templates/statsd/statsd-deployment.yaml | 3 +++
chart/templates/triggerer/triggerer-deployment.yaml | 3 +++
chart/templates/webserver/webserver-deployment.yaml | 3 +++
chart/templates/workers/worker-deployment.yaml | 3 +++
chart/values.schema.json | 9 +++++++++
chart/values.yaml | 1 +
helm_tests/airflow_aux/test_cleanup_pods.py | 11 +++++++++++
helm_tests/airflow_aux/test_create_user_job.py | 11 +++++++++++
helm_tests/airflow_aux/test_migrate_database_job.py | 11 +++++++++++
helm_tests/airflow_aux/test_pod_template_file.py | 12 ++++++++++++
helm_tests/airflow_core/test_dag_processor.py | 11 +++++++++++
helm_tests/airflow_core/test_scheduler.py | 11 +++++++++++
helm_tests/airflow_core/test_triggerer.py | 11 +++++++++++
helm_tests/airflow_core/test_worker.py | 11 +++++++++++
helm_tests/other/test_flower.py | 11 +++++++++++
helm_tests/other/test_pgbouncer.py | 11 +++++++++++
helm_tests/other/test_redis.py | 11 +++++++++++
helm_tests/other/test_statsd.py | 11 +++++++++++
helm_tests/webserver/test_webserver.py | 11 +++++++++++
28 files changed, 193 insertions(+)
diff --git a/chart/files/pod-template-file.kubernetes-helm-yaml
b/chart/files/pod-template-file.kubernetes-helm-yaml
index 5be3f8a404..a748dda054 100644
--- a/chart/files/pod-template-file.kubernetes-helm-yaml
+++ b/chart/files/pod-template-file.kubernetes-helm-yaml
@@ -103,6 +103,9 @@ spec:
securityContext: {{ $securityContext | nindent 4 }}
nodeSelector: {{- toYaml $nodeSelector | nindent 4 }}
affinity: {{- toYaml $affinity | nindent 4 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
terminationGracePeriodSeconds: {{
.Values.workers.terminationGracePeriodSeconds }}
tolerations: {{- toYaml $tolerations | nindent 4 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints | nindent 4
}}
diff --git a/chart/templates/cleanup/cleanup-cronjob.yaml
b/chart/templates/cleanup/cleanup-cronjob.yaml
index 9a70cc5e08..c09e279ab3 100644
--- a/chart/templates/cleanup/cleanup-cronjob.yaml
+++ b/chart/templates/cleanup/cleanup-cronjob.yaml
@@ -76,6 +76,9 @@ spec:
restartPolicy: Never
nodeSelector: {{- toYaml $nodeSelector | nindent 12 }}
affinity: {{- toYaml $affinity | nindent 12 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 12 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 12 }}
serviceAccountName: {{ include "cleanup.serviceAccountName" . }}
diff --git a/chart/templates/dag-processor/dag-processor-deployment.yaml
b/chart/templates/dag-processor/dag-processor-deployment.yaml
index 75e227eaac..4e87bae3c0 100644
--- a/chart/templates/dag-processor/dag-processor-deployment.yaml
+++ b/chart/templates/dag-processor/dag-processor-deployment.yaml
@@ -101,6 +101,9 @@ spec:
topologyKey: kubernetes.io/hostname
weight: 100
{{- end }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
terminationGracePeriodSeconds: {{
.Values.dagProcessor.terminationGracePeriodSeconds }}
diff --git a/chart/templates/flower/flower-deployment.yaml
b/chart/templates/flower/flower-deployment.yaml
index e18331d2b9..00f8f4a9af 100644
--- a/chart/templates/flower/flower-deployment.yaml
+++ b/chart/templates/flower/flower-deployment.yaml
@@ -74,6 +74,9 @@ spec:
spec:
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity: {{- toYaml $affinity | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "flower.serviceAccountName" . }}
diff --git a/chart/templates/jobs/create-user-job.yaml
b/chart/templates/jobs/create-user-job.yaml
index ad77d07159..22d68f2295 100644
--- a/chart/templates/jobs/create-user-job.yaml
+++ b/chart/templates/jobs/create-user-job.yaml
@@ -77,6 +77,9 @@ spec:
restartPolicy: OnFailure
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity: {{- toYaml $affinity | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "createUserJob.serviceAccountName" . }}
diff --git a/chart/templates/jobs/migrate-database-job.yaml
b/chart/templates/jobs/migrate-database-job.yaml
index b1e9c12c59..728137726b 100644
--- a/chart/templates/jobs/migrate-database-job.yaml
+++ b/chart/templates/jobs/migrate-database-job.yaml
@@ -77,6 +77,9 @@ spec:
restartPolicy: OnFailure
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity: {{- toYaml $affinity | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "migrateDatabaseJob.serviceAccountName" .
}}
diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml
b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
index 2cfe514794..ff4dc0d500 100644
--- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
@@ -82,6 +82,9 @@ spec:
{{- end }}
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity: {{- toYaml $affinity | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "pgbouncer.serviceAccountName" . }}
diff --git a/chart/templates/redis/redis-statefulset.yaml
b/chart/templates/redis/redis-statefulset.yaml
index 55a2db9cda..224f38f8f5 100644
--- a/chart/templates/redis/redis-statefulset.yaml
+++ b/chart/templates/redis/redis-statefulset.yaml
@@ -72,6 +72,9 @@ spec:
tolerations: {{- toYaml $tolerations | nindent 8 }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "redis.serviceAccountName" . }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
imagePullSecrets:
- name: {{ template "registry_secret" . }}
diff --git a/chart/templates/scheduler/scheduler-deployment.yaml
b/chart/templates/scheduler/scheduler-deployment.yaml
index 94d65ba1a3..04dc58b30d 100644
--- a/chart/templates/scheduler/scheduler-deployment.yaml
+++ b/chart/templates/scheduler/scheduler-deployment.yaml
@@ -109,6 +109,9 @@ spec:
{{- if .Values.scheduler.priorityClassName }}
priorityClassName: {{ .Values.scheduler.priorityClassName }}
{{- end }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
{{- if $affinity }}
diff --git a/chart/templates/statsd/statsd-deployment.yaml
b/chart/templates/statsd/statsd-deployment.yaml
index 808d7edcde..dd7723f302 100644
--- a/chart/templates/statsd/statsd-deployment.yaml
+++ b/chart/templates/statsd/statsd-deployment.yaml
@@ -78,6 +78,9 @@ spec:
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity: {{- toYaml $affinity | nindent 8 }}
tolerations: {{- toYaml $tolerations | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
topologySpreadConstraints: {{- toYaml $topologySpreadConstraints |
nindent 8 }}
serviceAccountName: {{ include "statsd.serviceAccountName" . }}
securityContext: {{ $securityContext | nindent 8 }}
diff --git a/chart/templates/triggerer/triggerer-deployment.yaml
b/chart/templates/triggerer/triggerer-deployment.yaml
index 3f5aaa077f..ccaedb88c3 100644
--- a/chart/templates/triggerer/triggerer-deployment.yaml
+++ b/chart/templates/triggerer/triggerer-deployment.yaml
@@ -103,6 +103,9 @@ spec:
priorityClassName: {{ .Values.triggerer.priorityClassName }}
{{- end }}
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
affinity:
{{- if $affinity }}
{{- toYaml $affinity | nindent 8 }}
diff --git a/chart/templates/webserver/webserver-deployment.yaml
b/chart/templates/webserver/webserver-deployment.yaml
index 3783682e7f..dcbe67b9e9 100644
--- a/chart/templates/webserver/webserver-deployment.yaml
+++ b/chart/templates/webserver/webserver-deployment.yaml
@@ -107,6 +107,9 @@ spec:
{{- if .Values.webserver.priorityClassName }}
priorityClassName: {{ .Values.webserver.priorityClassName }}
{{- end }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
{{- if $affinity }}
diff --git a/chart/templates/workers/worker-deployment.yaml
b/chart/templates/workers/worker-deployment.yaml
index c3579e6a83..f98ca3f09a 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -110,6 +110,9 @@ spec:
{{- if .Values.workers.priorityClassName }}
priorityClassName: {{ .Values.workers.priorityClassName }}
{{- end }}
+ {{- if .Values.schedulerName }}
+ schedulerName: {{ .Values.schedulerName }}
+ {{- end }}
nodeSelector: {{- toYaml $nodeSelector | nindent 8 }}
affinity:
{{- if $affinity }}
diff --git a/chart/values.schema.json b/chart/values.schema.json
index 38804f481c..47a8465767 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -207,6 +207,15 @@
"$ref":
"#/definitions/io.k8s.api.core.v1.TopologySpreadConstraint"
}
},
+ "schedulerName": {
+ "description": "Specify kube scheduler name for Pods.",
+ "type": [
+ "string",
+ "null"
+ ],
+ "default": null,
+ "x-docsSection": "Common"
+ },
"labels": {
"description": "Add common labels to all objects and pods defined
in this chart.",
"type": "object",
diff --git a/chart/values.yaml b/chart/values.yaml
index 4716e0f68a..38bf64c174 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -129,6 +129,7 @@ nodeSelector: {}
affinity: {}
tolerations: []
topologySpreadConstraints: []
+schedulerName: ~
# Add common labels to all objects and pods defined in this chart.
labels: {}
diff --git a/helm_tests/airflow_aux/test_cleanup_pods.py
b/helm_tests/airflow_aux/test_cleanup_pods.py
index b4f67e2fd0..c789c67e9c 100644
--- a/helm_tests/airflow_aux/test_cleanup_pods.py
+++ b/helm_tests/airflow_aux/test_cleanup_pods.py
@@ -162,6 +162,17 @@ class TestCleanupPods:
docs[0],
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"cleanup": {"enabled": True}, "schedulerName":
"airflow-scheduler"},
+ show_only=["templates/cleanup/cleanup-cronjob.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.jobTemplate.spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_default_command_and_args(self):
docs = render_chart(
values={"cleanup": {"enabled": True}},
show_only=["templates/cleanup/cleanup-cronjob.yaml"]
diff --git a/helm_tests/airflow_aux/test_create_user_job.py
b/helm_tests/airflow_aux/test_create_user_job.py
index 3ed0cf04af..3d6ec6c423 100644
--- a/helm_tests/airflow_aux/test_create_user_job.py
+++ b/helm_tests/airflow_aux/test_create_user_job.py
@@ -99,6 +99,17 @@ class TestCreateUserJob:
docs[0],
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/jobs/create-user-job.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_create_user_job_resources_are_configurable(self):
resources = {
"requests": {
diff --git a/helm_tests/airflow_aux/test_migrate_database_job.py
b/helm_tests/airflow_aux/test_migrate_database_job.py
index 6bd52a1100..e08e7c32d7 100644
--- a/helm_tests/airflow_aux/test_migrate_database_job.py
+++ b/helm_tests/airflow_aux/test_migrate_database_job.py
@@ -104,6 +104,17 @@ class TestMigrateDatabaseJob:
docs[0],
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/jobs/migrate-database-job.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
@pytest.mark.parametrize(
"use_default_image,expected_image",
[
diff --git a/helm_tests/airflow_aux/test_pod_template_file.py
b/helm_tests/airflow_aux/test_pod_template_file.py
index 46780c1e34..88afc36616 100644
--- a/helm_tests/airflow_aux/test_pod_template_file.py
+++ b/helm_tests/airflow_aux/test_pod_template_file.py
@@ -506,6 +506,18 @@ class TestPodTemplateFile:
"spec.topologySpreadConstraints[0]", docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/pod-template-file.yaml"],
+ chart_dir=self.temp_chart_dir,
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.schedulerName",
+ docs[0],
+ )
+
def test_should_not_create_default_affinity(self):
docs = render_chart(show_only=["templates/pod-template-file.yaml"],
chart_dir=self.temp_chart_dir)
diff --git a/helm_tests/airflow_core/test_dag_processor.py
b/helm_tests/airflow_core/test_dag_processor.py
index 74035222e7..2ab941f8e2 100644
--- a/helm_tests/airflow_core/test_dag_processor.py
+++ b/helm_tests/airflow_core/test_dag_processor.py
@@ -177,6 +177,17 @@ class TestDagProcessor:
"spec.template.spec.initContainers[0].env", docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"dagProcessor": {"enabled": True}, "schedulerName":
"airflow-scheduler"},
+
show_only=["templates/dag-processor/dag-processor-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/airflow_core/test_scheduler.py
b/helm_tests/airflow_core/test_scheduler.py
index 9bf2f0071d..d1007d8700 100644
--- a/helm_tests/airflow_core/test_scheduler.py
+++ b/helm_tests/airflow_core/test_scheduler.py
@@ -314,6 +314,17 @@ class TestScheduler:
"spec.template.spec.topologySpreadConstraints[0]", docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/scheduler/scheduler-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_default_affinity(self):
docs =
render_chart(show_only=["templates/scheduler/scheduler-deployment.yaml"])
diff --git a/helm_tests/airflow_core/test_triggerer.py
b/helm_tests/airflow_core/test_triggerer.py
index 846ad9ae7c..6375071849 100644
--- a/helm_tests/airflow_core/test_triggerer.py
+++ b/helm_tests/airflow_core/test_triggerer.py
@@ -202,6 +202,17 @@ class TestTriggerer:
assert "test_label" in
jmespath.search("spec.template.metadata.labels", docs[0])
assert jmespath.search("spec.template.metadata.labels",
docs[0])["test_label"] == "test_label_value"
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/triggerer/triggerer-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/airflow_core/test_worker.py
b/helm_tests/airflow_core/test_worker.py
index 81432ee7ac..80682f9e17 100644
--- a/helm_tests/airflow_core/test_worker.py
+++ b/helm_tests/airflow_core/test_worker.py
@@ -368,6 +368,17 @@ class TestWorker:
"spec.template.spec.topologySpreadConstraints[0]", docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/workers/worker-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_default_affinity(self):
docs =
render_chart(show_only=["templates/workers/worker-deployment.yaml"])
diff --git a/helm_tests/other/test_flower.py b/helm_tests/other/test_flower.py
index e195d146e7..d018455a19 100644
--- a/helm_tests/other/test_flower.py
+++ b/helm_tests/other/test_flower.py
@@ -164,6 +164,17 @@ class TestFlowerDeployment:
"spec.template.spec.containers[0].readinessProbe.exec.command",
docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"flower": {"enabled": True}, "schedulerName":
"airflow-scheduler"},
+ show_only=["templates/flower/flower-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/other/test_pgbouncer.py
b/helm_tests/other/test_pgbouncer.py
index cfe65d897e..e1a636916e 100644
--- a/helm_tests/other/test_pgbouncer.py
+++ b/helm_tests/other/test_pgbouncer.py
@@ -119,6 +119,17 @@ class TestPgbouncer:
expected_result = revision_history_limit if revision_history_limit
else global_revision_history_limit
assert jmespath.search("spec.revisionHistoryLimit", docs[0]) ==
expected_result
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"pgbouncer": {"enabled": True}, "schedulerName":
"airflow-scheduler"},
+ show_only=["templates/pgbouncer/pgbouncer-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/other/test_redis.py b/helm_tests/other/test_redis.py
index c99503a4b7..466e7b6bf1 100644
--- a/helm_tests/other/test_redis.py
+++ b/helm_tests/other/test_redis.py
@@ -243,6 +243,17 @@ class TestRedis:
)
assert 2 == len(docs)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/redis/redis-statefulset.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/other/test_statsd.py b/helm_tests/other/test_statsd.py
index 9a6666b6a8..820a59fe1e 100644
--- a/helm_tests/other/test_statsd.py
+++ b/helm_tests/other/test_statsd.py
@@ -105,6 +105,17 @@ class TestStatsd:
expected_result = revision_history_limit if revision_history_limit
else global_revision_history_limit
assert jmespath.search("spec.revisionHistoryLimit", docs[0]) ==
expected_result
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/statsd/statsd-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
def test_should_create_valid_affinity_tolerations_and_node_selector(self):
docs = render_chart(
values={
diff --git a/helm_tests/webserver/test_webserver.py
b/helm_tests/webserver/test_webserver.py
index 6387cc9a99..0ae7c60582 100644
--- a/helm_tests/webserver/test_webserver.py
+++ b/helm_tests/webserver/test_webserver.py
@@ -442,6 +442,17 @@ class TestWebserverDeployment:
"spec.template.spec.topologySpreadConstraints[0]", docs[0]
)
+ def test_scheduler_name(self):
+ docs = render_chart(
+ values={"schedulerName": "airflow-scheduler"},
+ show_only=["templates/webserver/webserver-deployment.yaml"],
+ )
+
+ assert "airflow-scheduler" == jmespath.search(
+ "spec.template.spec.schedulerName",
+ docs[0],
+ )
+
@pytest.mark.parametrize(
"log_persistence_values, expected_claim_name",
[