Skip to content

Commit 9b8f04a

Browse files
committed
Add deviceProfile value to chart
1 parent a12f091 commit 9b8f04a

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

deployments/helm/dra-example-driver/templates/kubeletplugin.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ spec:
5959
periodSeconds: 10
6060
{{- end }}
6161
env:
62+
- name: DEVICE_PROFILE
63+
value: {{ .Values.deviceProfile | quote }}
6264
- name: CDI_ROOT
6365
value: /var/run/cdi
6466
- name: KUBELET_REGISTRAR_DIRECTORY_PATH

deployments/helm/dra-example-driver/templates/webhook-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ spec:
4343
- --tls-cert-file=/cert/tls.crt
4444
- --tls-private-key-file=/cert/tls.key
4545
- --port={{ .Values.webhook.containerPort }}
46+
- --device-profile={{ .Values.deviceProfile }}
4647
ports:
4748
- name: webhook
4849
containerPort: {{ .Values.webhook.containerPort }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"deviceProfile": {
5+
"type": "string",
6+
"enum": [
7+
"gpu"
8+
]
9+
}
10+
}
11+
}

deployments/helm/dra-example-driver/values.yaml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ selectorLabelsOverride: {}
99

1010
allowDefaultNamespace: false
1111

12+
# deviceProfile describes the overall shape of the devices managed by the
13+
# driver. Available profiles are:
14+
# - "gpu": Node-local devices configurable through opaque config
15+
deviceProfile: "gpu"
16+
1217
imagePullSecrets: []
1318
image:
1419
repository: registry.k8s.io/dra-example-driver/dra-example-driver
@@ -25,26 +30,9 @@ serviceAccount:
2530
# If not set and create is true, a name is generated using the fullname template
2631
name: ""
2732

28-
controller:
29-
priorityClassName: "system-node-critical"
30-
podAnnotations: {}
31-
podSecurityContext: {}
32-
nodeSelector:
33-
node-role.kubernetes.io/control-plane: ""
34-
tolerations:
35-
- key: node-role.kubernetes.io/master
36-
operator: Exists
37-
effect: NoSchedule
38-
- key: node-role.kubernetes.io/control-plane
39-
operator: Exists
40-
effect: NoSchedule
41-
affinity: {}
42-
containers:
43-
controller:
44-
securityContext: {}
45-
resources: {}
46-
4733
kubeletPlugin:
34+
# numDevices describes how many GPUs to advertise on each node when the "gpu"
35+
# deviceProfile is used. Not relevant for other profiles.
4836
numDevices: 8
4937
priorityClassName: "system-node-critical"
5038
updateStrategy:

0 commit comments

Comments
 (0)