Skip to content

Commit

Permalink
unified define k8s-driver-manager image info in values.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
  • Loading branch information
lengrongfu committed Nov 23, 2024
1 parent fe9595a commit 6890ac9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 43 deletions.
2 changes: 1 addition & 1 deletion deployments/gpu-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
48 changes: 24 additions & 24 deletions deployments/gpu-operator/templates/clusterpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ spec:
enabled: {{ .Values.driver.rdma.enabled }}
useHostMofed: {{ .Values.driver.rdma.useHostMofed }}
manager:
{{- if .Values.driver.manager.repository }}
repository: {{ .Values.driver.manager.repository }}
{{- if .Values.driverManager.repository }}
repository: {{ .Values.driverManager.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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
25 changes: 7 additions & 18 deletions deployments/gpu-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit 6890ac9

Please sign in to comment.