From 5db38d5461641ef46e579d9ea5c210e22ac3af37 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 27 Sep 2024 16:43:32 +0200 Subject: [PATCH] Allow CDI annotation prefix to be specified This change allows the CDI annotation prefix to be specified as a helm value and not only as an envvar. Signed-off-by: Evan Lezar --- .../templates/daemonset-device-plugin.yml | 4 ++++ deployments/helm/nvidia-device-plugin/values.yaml | 1 + 2 files changed, 5 insertions(+) diff --git a/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml b/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml index b984d3db2..a42d34d7c 100644 --- a/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml +++ b/deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml @@ -169,6 +169,10 @@ spec: - name: NVIDIA_CDI_HOOK_PATH value: {{ .Values.cdi.nvidiaHookPath }} {{- end }} + {{- if typeIs "string" .Values.cdi.annotationPrefix }} + - name: CDI_ANNOTATION_PREFIX + value: {{ .Values.cdi.annotationPrefix | quote }} + {{- end }} {{- if typeIs "bool" .Values.gdsEnabled }} - name: GDS_ENABLED value: {{ .Values.gdsEnabled | quote }} diff --git a/deployments/helm/nvidia-device-plugin/values.yaml b/deployments/helm/nvidia-device-plugin/values.yaml index b0c624295..79790619f 100644 --- a/deployments/helm/nvidia-device-plugin/values.yaml +++ b/deployments/helm/nvidia-device-plugin/values.yaml @@ -156,3 +156,4 @@ cdi: # nvidiaHookPath specifies the path to the nvidia-cdi-hook or nvidia-ctk executables on the host. # This is required to ensure that the generated CDI specification refers to the correct CDI hooks. nvidiaHookPath: null + annotationPrefix: null