diff --git a/charts/t8s-cluster/templates/workload-cluster/gpu-operator.yaml b/charts/t8s-cluster/templates/workload-cluster/gpu-operator.yaml index be581ad078..080f30f51d 100644 --- a/charts/t8s-cluster/templates/workload-cluster/gpu-operator.yaml +++ b/charts/t8s-cluster/templates/workload-cluster/gpu-operator.yaml @@ -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 }}