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 9730dba0a0 Chart: Fix `runtimeClassName` for KE (#34631)
9730dba0a0 is described below
commit 9730dba0a0afa9f55167709b86626b0c8f445e9a
Author: Jed Cunningham <[email protected]>
AuthorDate: Tue Sep 26 15:18:17 2023 -0600
Chart: Fix `runtimeClassName` for KE (#34631)
---
chart/files/pod-template-file.kubernetes-helm-yaml | 2 +-
helm_tests/airflow_aux/test_pod_template_file.py | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/chart/files/pod-template-file.kubernetes-helm-yaml
b/chart/files/pod-template-file.kubernetes-helm-yaml
index a748dda054..48e2c476b9 100644
--- a/chart/files/pod-template-file.kubernetes-helm-yaml
+++ b/chart/files/pod-template-file.kubernetes-helm-yaml
@@ -90,7 +90,7 @@ spec:
priorityClassName: {{ .Values.workers.priorityClassName }}
{{- end }}
{{- if .Values.workers.runtimeClassName }}
- priorityClassName: {{ .Values.workers.runtimeClassName }}
+ runtimeClassName: {{ .Values.workers.runtimeClassName }}
{{- end }}
{{- if or .Values.registry.secretName .Values.registry.connection }}
imagePullSecrets:
diff --git a/helm_tests/airflow_aux/test_pod_template_file.py
b/helm_tests/airflow_aux/test_pod_template_file.py
index 88afc36616..e56d77c55a 100644
--- a/helm_tests/airflow_aux/test_pod_template_file.py
+++ b/helm_tests/airflow_aux/test_pod_template_file.py
@@ -792,3 +792,14 @@ class TestPodTemplateFile:
)
assert 123 == jmespath.search("spec.terminationGracePeriodSeconds",
docs[0])
+
+ def test_runtime_class_name_values_are_configurable(self):
+ docs = render_chart(
+ values={
+ "workers": {"runtimeClassName": "nvidia"},
+ },
+ show_only=["templates/pod-template-file.yaml"],
+ chart_dir=self.temp_chart_dir,
+ )
+
+ assert jmespath.search("spec.runtimeClassName", docs[0]) == "nvidia"