Skip to content

Commit 91b86e1

Browse files
feat(chart): add priorityClassName support to all NVSentinel workloads
NVSentinel pods run at priority 0 by default, below any workload that sets a priority class. On a CPU-saturated cluster the scheduler therefore leaves them Pending instead of preempting a lower-value pod, and a node ends up with no health monitor while the DaemonSet still reports healthy, because a DaemonSet whose pods cannot be placed is not unhealthy. The chart had no way to set a priority class, so the only workarounds were patching rendered manifests or a mutating webhook. Adds two globals, mirroring the existing nodeSelector/tolerations split for the same reason: the node agents and the control-plane components run on different node classes and want different priorities. global.priorityClassName node-level agents (DaemonSets, platform-connectors) global.systemPriorityClassName control-plane components (Deployments) Every component also takes a local priorityClassName, and each template uses the established (global | default local) idiom already used for tolerations, so the global wins when both are set. Both globals default to empty, which omits the field from the pod spec entirely, so a default render is unchanged and no existing deployment is affected. Covers 21 pod specs: the platform-connectors DaemonSet, both gpu-health-monitor DCGM variants, both syslog-health-monitor variants, metadata-collector, nic-health-monitor, the preflight image cache, and the labeler, health-events-analyzer, fault-quarantine, node-drainer, fault-remediation, janitor, janitor-provider, csp-health-monitor, kubernetes-object-monitor, event-exporter, incluster-file-server, slurm-drain-monitor, lifecycle-manager and preflight Deployments. Short-lived Jobs and lifecycle hooks are left alone: they have their own local scheduling conventions rather than reading the globals, and pod priority matters far less for work that is not long-running. The vendored postgresql and mongodb subcharts already support priorityClassName upstream. Tests cover both halves of the split, including negative cases asserting that the node-agent global does not reach the control-plane components and vice versa, so the two cannot silently collapse into one. Signed-off-by: Lonnie Friedman <lfriedman@together.ai>
1 parent 1405bcd commit 91b86e1

43 files changed

Lines changed: 346 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

distros/kubernetes/nvsentinel/charts/csp-health-monitor/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,6 @@ spec:
268268
tolerations:
269269
{{- toYaml . | nindent 8 }}
270270
{{- end }}
271+
{{- with (((.Values.global).systemPriorityClassName) | default .Values.priorityClassName) }}
272+
priorityClassName: {{ . | quote }}
273+
{{- end }}

distros/kubernetes/nvsentinel/charts/csp-health-monitor/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ quarantineTriggerEngine:
4545
# Scheduling configuration
4646
nodeSelector: {}
4747
affinity: {}
48+
# Pod priority for this component. Overridden by the matching global when that is set.
49+
priorityClassName: ""
50+
4851
tolerations: []
4952

5053
podAnnotations: {}

distros/kubernetes/nvsentinel/charts/event-exporter/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,6 @@ spec:
190190
tolerations:
191191
{{- toYaml . | nindent 8 }}
192192
{{- end }}
193+
{{- with (.Values.global.systemPriorityClassName | default .Values.priorityClassName) }}
194+
priorityClassName: {{ . | quote }}
195+
{{- end }}

distros/kubernetes/nvsentinel/charts/event-exporter/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,5 @@ exporter:
9292
maxBackoff: "5m"
9393
backoffMultiplier: 2.0
9494

95+
# Pod priority for this component. Overridden by the matching global when that is set.
96+
priorityClassName: ""

distros/kubernetes/nvsentinel/charts/fault-quarantine/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,6 @@ spec:
210210
tolerations:
211211
{{- toYaml . | nindent 8 }}
212212
{{- end }}
213+
{{- with (((.Values.global).systemPriorityClassName) | default .Values.priorityClassName) }}
214+
priorityClassName: {{ . | quote }}
215+
{{- end }}

distros/kubernetes/nvsentinel/charts/fault-quarantine/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ resources:
3030
# Scheduling configuration
3131
nodeSelector: {}
3232
affinity: {}
33+
# Pod priority for this component. Overridden by the matching global when that is set.
34+
priorityClassName: ""
35+
3336
tolerations: []
3437

3538
podAnnotations: {}

distros/kubernetes/nvsentinel/charts/fault-remediation/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,6 @@ spec:
203203
tolerations:
204204
{{- toYaml . | nindent 8 }}
205205
{{- end }}
206+
{{- with (((.Values.global).systemPriorityClassName) | default .Values.priorityClassName) }}
207+
priorityClassName: {{ . | quote }}
208+
{{- end }}

distros/kubernetes/nvsentinel/charts/fault-remediation/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ affinity: {}
4040
podAnnotations: {}
4141

4242
# Special tolerations for fault remediation - allow running on nodes with any taints for log collection
43+
# Pod priority for this component. Overridden by the matching global when that is set.
44+
priorityClassName: ""
45+
4346
tolerations:
4447
- operator: "Exists"
4548

distros/kubernetes/nvsentinel/charts/gpu-health-monitor/templates/daemonset-dcgm-3.x.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,6 @@ spec:
156156
tolerations:
157157
{{- toYaml . | nindent 8 }}
158158
{{- end }}
159+
{{- with (.Values.global.priorityClassName | default .Values.priorityClassName) }}
160+
priorityClassName: {{ . | quote }}
161+
{{- end }}

distros/kubernetes/nvsentinel/charts/gpu-health-monitor/templates/daemonset-dcgm-4.x.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,6 @@ spec:
156156
tolerations:
157157
{{- toYaml . | nindent 8 }}
158158
{{- end }}
159+
{{- with (.Values.global.priorityClassName | default .Values.priorityClassName) }}
160+
priorityClassName: {{ . | quote }}
161+
{{- end }}

0 commit comments

Comments
 (0)