From b97a5a1b9f9f8b9c281a91e6490f322ea7137d80 Mon Sep 17 00:00:00 2001 From: "rongfu.leng" Date: Mon, 2 Dec 2024 22:44:10 +0800 Subject: [PATCH] unified define k8s-driver-manager image info in values.yaml Signed-off-by: rongfu.leng --- .../gpu-operator/templates/_helpers.tpl | 2 +- .../gpu-operator/templates/clusterpolicy.yaml | 44 +++++++++---------- deployments/gpu-operator/values.yaml | 25 +++-------- 3 files changed, 30 insertions(+), 41 deletions(-) diff --git a/deployments/gpu-operator/templates/_helpers.tpl b/deployments/gpu-operator/templates/_helpers.tpl index 305c9d1fe..8969d66e1 100644 --- a/deployments/gpu-operator/templates/_helpers.tpl +++ b/deployments/gpu-operator/templates/_helpers.tpl @@ -76,5 +76,5 @@ Full image name with tag Full image name with tag */}} {{- define "driver-manager.fullimage" -}} -{{- .Values.driver.manager.repository -}}/{{- .Values.driver.manager.image -}}:{{- .Values.driver.manager.version -}} +{{- .Values.driverManager.repository -}}/{{- .Values.driverManager.image -}}:{{- .Values.driverManager.version -}} {{- end }} diff --git a/deployments/gpu-operator/templates/clusterpolicy.yaml b/deployments/gpu-operator/templates/clusterpolicy.yaml index af9e87c38..e0f9801dc 100644 --- a/deployments/gpu-operator/templates/clusterpolicy.yaml +++ b/deployments/gpu-operator/templates/clusterpolicy.yaml @@ -176,14 +176,14 @@ spec: {{- if .Values.driver.manager.repository }} repository: {{ .Values.driver.manager.repository }} {{- end }} - {{- if .Values.driver.manager.image }} - image: {{ .Values.driver.manager.image }} + {{- if .Values.driverManager.image }} + image: {{ .Values.driverManager.image }} {{- end }} - {{- if .Values.driver.manager.version }} - version: {{ .Values.driver.manager.version | quote }} + {{- if .Values.driverManager.version }} + version: {{ .Values.driverManager.version | quote }} {{- end }} - {{- if .Values.driver.manager.imagePullPolicy }} - imagePullPolicy: {{ .Values.driver.manager.imagePullPolicy }} + {{- if .Values.driverManager.imagePullPolicy }} + imagePullPolicy: {{ .Values.driverManager.imagePullPolicy }} {{- end }} {{- if .Values.driver.manager.env }} env: {{ toYaml .Values.driver.manager.env | nindent 8 }} @@ -262,17 +262,17 @@ spec: args: {{ toYaml .Values.vgpuManager.args | nindent 6 }} {{- end }} driverManager: - {{- if .Values.vgpuManager.driverManager.repository }} - repository: {{ .Values.vgpuManager.driverManager.repository }} + {{- if .Values.driverManager.repository }} + repository: {{ .Values.driverManager.repository }} {{- end }} - {{- if .Values.vgpuManager.driverManager.image }} - image: {{ .Values.vgpuManager.driverManager.image }} + {{- if .Values.driverManager.image }} + image: {{ .Values.driverManager.image }} {{- end }} - {{- if .Values.vgpuManager.driverManager.version }} - version: {{ .Values.vgpuManager.driverManager.version | quote }} + {{- if .Values.driverManager.version }} + version: {{ .Values.driverManager.version | quote }} {{- end }} - {{- if .Values.vgpuManager.driverManager.imagePullPolicy }} - imagePullPolicy: {{ .Values.vgpuManager.driverManager.imagePullPolicy }} + {{- if .Values.driverManager.imagePullPolicy }} + imagePullPolicy: {{ .Values.driverManager.imagePullPolicy }} {{- end }} {{- if .Values.vgpuManager.driverManager.env }} env: {{ toYaml .Values.vgpuManager.driverManager.env | nindent 8 }} @@ -331,17 +331,17 @@ spec: args: {{ toYaml .Values.vfioManager.args | nindent 6 }} {{- end }} driverManager: - {{- if .Values.vfioManager.driverManager.repository }} - repository: {{ .Values.vfioManager.driverManager.repository }} + {{- if .Values.driverManager.repository }} + repository: {{ .Values.driverManager.repository }} {{- end }} - {{- if .Values.vfioManager.driverManager.image }} - image: {{ .Values.vfioManager.driverManager.image }} + {{- if .Values.driverManager.image }} + image: {{ .Values.driverManager.image }} {{- end }} - {{- if .Values.vfioManager.driverManager.version }} - version: {{ .Values.vfioManager.driverManager.version | quote }} + {{- if .Values.driverManager.version }} + version: {{ .Values.driverManager.version | quote }} {{- end }} - {{- if .Values.vfioManager.driverManager.imagePullPolicy }} - imagePullPolicy: {{ .Values.vfioManager.driverManager.imagePullPolicy }} + {{- if .Values.driverManager.imagePullPolicy }} + imagePullPolicy: {{ .Values.driverManager.imagePullPolicy }} {{- end }} {{- if .Values.vfioManager.driverManager.env }} env: {{ toYaml .Values.vfioManager.driverManager.env | nindent 8 }} diff --git a/deployments/gpu-operator/values.yaml b/deployments/gpu-operator/values.yaml index a9f68bf59..80c1a240c 100644 --- a/deployments/gpu-operator/values.yaml +++ b/deployments/gpu-operator/values.yaml @@ -189,12 +189,6 @@ driver: timeoutSeconds: 300 deleteEmptyDir: false manager: - image: k8s-driver-manager - repository: nvcr.io/nvidia/cloud-native - # When choosing a different version of k8s-driver-manager, DO NOT downgrade to a version lower than v0.6.4 - # to ensure k8s-driver-manager stays compatible with gpu-operator starting from v24.3.0 - version: v0.7.0 - imagePullPolicy: IfNotPresent env: - name: ENABLE_GPU_POD_EVICTION value: "true" @@ -459,12 +453,6 @@ vgpuManager: env: [] resources: {} driverManager: - image: k8s-driver-manager - repository: nvcr.io/nvidia/cloud-native - # When choosing a different version of k8s-driver-manager, DO NOT downgrade to a version lower than v0.6.4 - # to ensure k8s-driver-manager stays compatible with gpu-operator starting from v24.3.0 - version: v0.7.0 - imagePullPolicy: IfNotPresent env: - name: ENABLE_GPU_POD_EVICTION value: "false" @@ -493,12 +481,6 @@ vfioManager: env: [] resources: {} driverManager: - image: k8s-driver-manager - repository: nvcr.io/nvidia/cloud-native - # When choosing a different version of k8s-driver-manager, DO NOT downgrade to a version lower than v0.6.4 - # to ensure k8s-driver-manager stays compatible with gpu-operator starting from v24.3.0 - version: v0.7.0 - imagePullPolicy: IfNotPresent env: - name: ENABLE_GPU_POD_EVICTION value: "false" @@ -600,3 +582,10 @@ node-feature-discovery: # resourceLabels: ["nvidia.com/feature-1","nvidia.com/feature-2"] # enableTaints: false # labelWhiteList: "nvidia.com/gpu" + +# all use driver manager components from the same image version +driverManager: + image: k8s-driver-manager + repository: nvcr.io/nvidia/cloud-native + version: v0.7.0 + imagePullPolicy: IfNotPresent \ No newline at end of file