Skip to content

Commit c876baf

Browse files
authored
fix(helm): deploy compute domain resources only when DRA plugin is en… (#164)
…abled Compute domain resources (DeviceClass, controller, RBAC) require the DRA API which is only available in Kubernetes 1.31+. Previously these were always deployed or controlled by a separate flag, causing failures on older Kubernetes versions. Now all compute domain related objects are gated by computeDomainDraPlugin.enabled, allowing the chart to be deployed on all supported Kubernetes versions.
1 parent 61edc9a commit c876baf

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

deploy/fake-gpu-operator/templates/compute-domain-controller/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.computeDomainController.enabled }}
1+
{{- if .Values.computeDomainDraPlugin.enabled }}
22
---
33
apiVersion: rbac.authorization.k8s.io/v1
44
kind: ClusterRole

deploy/fake-gpu-operator/templates/compute-domain-controller/clusterrolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.computeDomainController.enabled }}
1+
{{- if .Values.computeDomainDraPlugin.enabled }}
22
---
33
apiVersion: rbac.authorization.k8s.io/v1
44
kind: ClusterRoleBinding

deploy/fake-gpu-operator/templates/compute-domain-controller/computedomain-controller-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.computeDomainController.enabled }}
1+
{{- if .Values.computeDomainDraPlugin.enabled }}
22
---
33
apiVersion: apps/v1
44
kind: Deployment

deploy/fake-gpu-operator/templates/compute-domain-controller/deviceclass-computedomain.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.computeDomainDraPlugin.enabled }}
12
---
23
apiVersion: {{ include "dra-example-driver.resourceApiVersion" . }}
34
kind: DeviceClass
@@ -7,3 +8,4 @@ spec:
78
selectors:
89
- cel:
910
expression: "device.driver == 'compute-domain.nvidia.com' && device.attributes['compute-domain.nvidia.com'].type == 'channel' && device.attributes['compute-domain.nvidia.com'].id == 0"
11+
{{- end }}

deploy/fake-gpu-operator/templates/compute-domain-controller/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.computeDomainController.enabled }}
1+
{{- if .Values.computeDomainDraPlugin.enabled }}
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:

deploy/fake-gpu-operator/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ topology:
180180
migStrategy: mixed
181181

182182
computeDomainController:
183-
enabled: true
184183
image:
185184
pullPolicy: Always
186185
repository: ghcr.io/run-ai/fake-gpu-operator/compute-domain-controller

0 commit comments

Comments
 (0)