From a2e827e97a5f544e8a095d13199a52b3841f2391 Mon Sep 17 00:00:00 2001 From: dttung2905 Date: Sat, 15 Aug 2026 19:00:16 +0100 Subject: [PATCH 1/2] Render global.daemonsetsTolerations into kai-config Signed-off-by: dttung2905 --- .../kai-scheduler/templates/_helpers.tpl | 4 ++ .../tests/numa_placement_exporter_test.yaml | 42 +++++++++++++++++++ deployments/kai-scheduler/values.yaml | 3 ++ 3 files changed, 49 insertions(+) diff --git a/deployments/kai-scheduler/templates/_helpers.tpl b/deployments/kai-scheduler/templates/_helpers.tpl index 6c73c6f22..b130ab517 100644 --- a/deployments/kai-scheduler/templates/_helpers.tpl +++ b/deployments/kai-scheduler/templates/_helpers.tpl @@ -87,6 +87,10 @@ spec: tolerations: {{- toYaml .Values.global.tolerations | nindent 6 }} {{- end }} + {{- if .Values.global.daemonsetsTolerations }} + daemonsetsTolerations: + {{- toYaml .Values.global.daemonsetsTolerations | nindent 6 }} + {{- end }} {{- if .Values.global.priorityClassName }} priorityClassName: {{ .Values.global.priorityClassName | quote }} {{- end }} diff --git a/deployments/kai-scheduler/tests/numa_placement_exporter_test.yaml b/deployments/kai-scheduler/tests/numa_placement_exporter_test.yaml index b0c12a44f..ae0024847 100644 --- a/deployments/kai-scheduler/tests/numa_placement_exporter_test.yaml +++ b/deployments/kai-scheduler/tests/numa_placement_exporter_test.yaml @@ -48,3 +48,45 @@ tests: - equal: path: spec.numaPlacementExporter.tolerations[0].operator value: Exists + + - it: should not render global.daemonsetsTolerations when the list is empty + asserts: + - notExists: + path: spec.global.daemonsetsTolerations + + - it: should render global.daemonsetsTolerations onto spec.global + set: + global.daemonsetsTolerations: + - key: nvidia.com/gpu + operator: Exists + effect: NoSchedule + asserts: + - equal: + path: spec.global.daemonsetsTolerations[0].key + value: nvidia.com/gpu + - equal: + path: spec.global.daemonsetsTolerations[0].operator + value: Exists + - equal: + path: spec.global.daemonsetsTolerations[0].effect + value: NoSchedule + + - it: should render global.daemonsetsTolerations independently of exporter tolerations + set: + global.daemonsetsTolerations: + - key: dedicated + operator: Equal + value: gpu + effect: NoSchedule + numaPlacementExporter.tolerations: + - operator: Exists + asserts: + - equal: + path: spec.global.daemonsetsTolerations[0].key + value: dedicated + - equal: + path: spec.global.daemonsetsTolerations[0].value + value: gpu + - equal: + path: spec.numaPlacementExporter.tolerations[0].operator + value: Exists diff --git a/deployments/kai-scheduler/values.yaml b/deployments/kai-scheduler/values.yaml index 969fc045f..94ea99abe 100644 --- a/deployments/kai-scheduler/values.yaml +++ b/deployments/kai-scheduler/values.yaml @@ -25,6 +25,9 @@ global: affinity: {} requireDefaultPodAntiAffinityTerm: false tolerations: [] + # Additional tolerations for cluster DaemonSets (e.g. NUMA placement exporter). + # Merged ahead of each DaemonSet's own tolerations by the operator. + daemonsetsTolerations: [] priorityClassName: "" namespaceLabelSelector: {} podLabelSelector: {} From 18db72ee1688b7dc40fdaf00b44aa80d64a8af0e Mon Sep 17 00:00:00 2001 From: dttung2905 Date: Sat, 15 Aug 2026 19:02:54 +0100 Subject: [PATCH 2/2] Add changelog Signed-off-by: dttung2905 --- .changes/unreleased/Fixed-20260815-190234.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixed-20260815-190234.yaml diff --git a/.changes/unreleased/Fixed-20260815-190234.yaml b/.changes/unreleased/Fixed-20260815-190234.yaml new file mode 100644 index 000000000..062d431cb --- /dev/null +++ b/.changes/unreleased/Fixed-20260815-190234.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Render global.daemonsetsTolerations into kai-config +time: 2026-08-15T19:02:34.96721934+01:00 +custom: + Author: dttung2905 + Issue: ""