Skip to content

Commit

Permalink
feat(t8s-cluster/workload-cluster): only run node-feature-discovery o…
Browse files Browse the repository at this point in the history
…n gpu nodes

there will never be gpus on other nodes, so we can save some resources
this way
  • Loading branch information
cwrau committed Aug 23, 2023
1 parent 6a6f0de commit ed9b18c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions charts/t8s-cluster/templates/workload-cluster/gpu-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,21 @@ spec:
storageNamespace: kube-system
targetNamespace: kube-system
releaseName: gpu-operator
values:
node-feature-discovery:
topologyUpdater:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node.kubernetes.io/instance-type
operator: In
{{- $gpuFlavours := list }}
{{- range $_, $machineDeploymentClass := .Values.workers -}}
{{- if contains "gpu" (lower $machineDeploymentClass.flavor) -}}
{{- $gpuFlavours = append $gpuFlavours $machineDeploymentClass.flavor -}}
{{- end -}}
{{- end }}
values: {{- $gpuFlavours | toYaml | nindent 24 }}
{{- end }}

0 comments on commit ed9b18c

Please sign in to comment.