This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch chart/v1-2x-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/chart/v1-2x-test by this push:
new 7aaa387e880 [chart/v1-2x-test] Add workers.celery.runtimeClassName &
workers.kubernetes.runtimeClassName (#61962) (#64553)
7aaa387e880 is described below
commit 7aaa387e8804f0e547dc9bd91b44eb348aa76c9d
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Mar 31 22:28:25 2026 +0200
[chart/v1-2x-test] Add workers.celery.runtimeClassName &
workers.kubernetes.runtimeClassName (#61962) (#64553)
* Add workers.celery.runtimeClassName & workers.kubernetes.runtimeClassName
* Add deprecation
(cherry picked from commit 21bbde3909ba892fb76444d57801ecefcbd05a34)
Co-authored-by: Przemysław Mirowski <[email protected]>
---
chart/files/pod-template-file.kubernetes-helm-yaml | 4 ++--
chart/newsfragments/61962.significant.rst | 1 +
chart/templates/NOTES.txt | 8 ++++++++
chart/values.schema.json | 21 ++++++++++++++++++---
chart/values.yaml | 5 +++++
.../airflow_aux/test_pod_template_file.py | 14 ++++++++++----
.../tests/helm_tests/airflow_core/test_worker.py | 14 ++++++++++----
.../helm_tests/airflow_core/test_worker_sets.py | 7 +++++++
8 files changed, 61 insertions(+), 13 deletions(-)
diff --git a/chart/files/pod-template-file.kubernetes-helm-yaml
b/chart/files/pod-template-file.kubernetes-helm-yaml
index 9b9bb1083b5..59fd6d82f7d 100644
--- a/chart/files/pod-template-file.kubernetes-helm-yaml
+++ b/chart/files/pod-template-file.kubernetes-helm-yaml
@@ -219,8 +219,8 @@ spec:
{{- if or .Values.workers.kubernetes.priorityClassName
.Values.workers.priorityClassName }}
priorityClassName: {{ .Values.workers.kubernetes.priorityClassName | default
.Values.workers.priorityClassName }}
{{- end }}
- {{- if .Values.workers.runtimeClassName }}
- runtimeClassName: {{ .Values.workers.runtimeClassName }}
+ {{- if or .Values.workers.kubernetes.runtimeClassName
.Values.workers.runtimeClassName }}
+ runtimeClassName: {{ .Values.workers.kubernetes.runtimeClassName | default
.Values.workers.runtimeClassName }}
{{- end }}
imagePullSecrets: {{- include "image_pull_secrets" . | nindent 4 }}
{{- if or .Values.workers.kubernetes.hostAliases .Values.workers.hostAliases
}}
diff --git a/chart/newsfragments/61962.significant.rst
b/chart/newsfragments/61962.significant.rst
new file mode 100644
index 00000000000..a1d6551fa1d
--- /dev/null
+++ b/chart/newsfragments/61962.significant.rst
@@ -0,0 +1 @@
+``workers.runtimeClassName`` section is now deprecated in favor of
``workers.celery.runtimeClassName`` and
``workers.kubernetes.runtimeClassName``. Please update your configuration
accordingly.
diff --git a/chart/templates/NOTES.txt b/chart/templates/NOTES.txt
index 417e0c626c5..520717c6b29 100644
--- a/chart/templates/NOTES.txt
+++ b/chart/templates/NOTES.txt
@@ -629,6 +629,14 @@ DEPRECATION WARNING:
{{- end }}
+{{- if not (empty .Values.workers.runtimeClassName) }}
+
+ DEPRECATION WARNING:
+ `workers.runtimeClassName` has been renamed to
`workers.celery.runtimeClassName`/`workers.kubernetes.runtimeClassName`.
+ Please change your values as support for the old name will be dropped in a
future release.
+
+{{- end }}
+
{{- if not (empty .Values.workers.priorityClassName) }}
DEPRECATION WARNING:
diff --git a/chart/values.schema.json b/chart/values.schema.json
index ef10a2e8cee..025efe76172 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -2341,7 +2341,7 @@
}
},
"runtimeClassName": {
- "description": "Specify runtime for Airflow Celery worker
pods and pods created with pod-template-file.",
+ "description": "Specify runtime for Airflow Celery worker
pods and pods created with pod-template-file (deprecated, use
``workers.celery.runtimeClassName`` and/or
``workers.kubernetes.runtimeClassName`` instead).",
"type": [
"string",
"null"
@@ -3310,14 +3310,21 @@
"type": "string"
}
},
- "priorityClassName": {
- "description": "Specify priority for Airflow
Celery worker pods.",
+ "runtimeClassName": {
+ "description": "Specify runtime for Airflow Celery
worker pods.",
"type": [
"string",
"null"
],
"default": null
},
+ "priorityClassName": {
+ "description": "Specify priority for Airflow
Celery worker pods.",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
"hostAliases": {
"description": "Specify HostAliases for Airflow
Celery worker pods.",
"items": {
@@ -3637,6 +3644,14 @@
"type": "string"
}
},
+ "runtimeClassName": {
+ "description": "Specify runtime for pods created
with pod-template-file.",
+ "type": [
+ "string",
+ "null"
+ ],
+ "default": null
+ },
"priorityClassName": {
"description": "Specify priority for pods created
with pod-template-file.",
"type": [
diff --git a/chart/values.yaml b/chart/values.yaml
index 8b61014246e..902bd7c0e42 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -1062,6 +1062,7 @@ workers:
# (deprecated, use workers.celery.nodeSelector or/and
workers.kubernetes.nodeSelector instead)
nodeSelector: {}
+ # (deprecated, use workers.celery.runtimeClassName and/or
workers.kubernetes.runtimeClassName instead)
runtimeClassName: ~
# (deprecated, use workers.celery.priorityClassName and/or
workers.kubernetes.priorityClassName instead)
@@ -1395,6 +1396,8 @@ workers:
# Select certain nodes for Airflow Celery worker pods
nodeSelector: {}
+ runtimeClassName: ~
+
priorityClassName: ~
# hostAliases to use in Airflow Celery worker pods
@@ -1481,6 +1484,8 @@ workers:
# Select certain nodes for pods created with pod-template-file
nodeSelector: {}
+ runtimeClassName: ~
+
priorityClassName: ~
# hostAliases to use in pods created with pod-template-file
diff --git a/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
b/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
index 48875e0f517..d4bd01ca82f 100644
--- a/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
+++ b/helm-tests/tests/helm_tests/airflow_aux/test_pod_template_file.py
@@ -1263,11 +1263,17 @@ class TestPodTemplateFile:
assert jmespath.search("spec.terminationGracePeriodSeconds", docs[0])
== 123
- def test_runtime_class_name_values_are_configurable(self):
+ @pytest.mark.parametrize(
+ "workers_values",
+ [
+ {"runtimeClassName": "nvidia"},
+ {"kubernetes": {"runtimeClassName": "nvidia"}},
+ {"runtimeClassName": "test", "kubernetes": {"runtimeClassName":
"nvidia"}},
+ ],
+ )
+ def test_runtime_class_name_values_are_configurable(self, workers_values):
docs = render_chart(
- values={
- "workers": {"runtimeClassName": "nvidia"},
- },
+ values={"workers": workers_values},
show_only=["templates/pod-template-file.yaml"],
chart_dir=self.temp_chart_dir,
)
diff --git a/helm-tests/tests/helm_tests/airflow_core/test_worker.py
b/helm-tests/tests/helm_tests/airflow_core/test_worker.py
index 57e4b3a0146..2e663e10b41 100644
--- a/helm-tests/tests/helm_tests/airflow_core/test_worker.py
+++ b/helm-tests/tests/helm_tests/airflow_core/test_worker.py
@@ -728,11 +728,17 @@ class TestWorker:
docs[0],
) == {"component": "worker"}
- def test_runtime_class_name_values_are_configurable(self):
+ @pytest.mark.parametrize(
+ "workers_values",
+ [
+ {"runtimeClassName": "nvidia"},
+ {"celery": {"runtimeClassName": "nvidia"}},
+ {"runtimeClassName": "test", "celery": {"runtimeClassName":
"nvidia"}},
+ ],
+ )
+ def test_runtime_class_name_values_are_configurable(self, workers_values):
docs = render_chart(
- values={
- "workers": {"runtimeClassName": "nvidia"},
- },
+ values={"workers": workers_values},
show_only=["templates/workers/worker-deployment.yaml"],
)
diff --git a/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
b/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
index 6cd8b983154..b82b96c503f 100644
--- a/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
+++ b/helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py
@@ -2516,6 +2516,13 @@ class TestWorkerSets:
"sets": [{"name": "set1", "runtimeClassName":
"test-class"}],
},
},
+ {
+ "celery": {
+ "runtimeClassName": "test",
+ "enableDefault": False,
+ "sets": [{"name": "set1", "runtimeClassName":
"test-class"}],
+ },
+ },
],
)
def test_overwrite_runtime_class_name(self, workers_values):