Skip to content

Commit 81a0e5e

Browse files
committed
Always use dedicated service account in device-plugin helm chart
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
1 parent c0a073e commit 81a0e5e

6 files changed

Lines changed: 0 additions & 17 deletions

File tree

deployments/helm/nvidia-device-plugin/templates/daemonset-device-plugin.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
{{- if .Values.devicePlugin.enabled }}
1616
---
1717
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
18-
{{- $useServiceAccount := $options.hasConfigMap }}
1918
{{- $configMapName := (include "nvidia-device-plugin.configMapName" .) | trim }}
2019
{{- $daemonsetName := printf "%s" (include "nvidia-device-plugin.fullname" .) | trunc 63 | trimSuffix "-" }}
2120
apiVersion: apps/v1
@@ -56,9 +55,7 @@ spec:
5655
{{- end }}
5756
securityContext:
5857
{{- toYaml .Values.podSecurityContext | nindent 8 }}
59-
{{- if $useServiceAccount }}
6058
serviceAccountName: {{ include "nvidia-device-plugin.fullname" . }}-service-account
61-
{{- end }}
6259
{{- if $options.hasConfigMap }}
6360
shareProcessNamespace: true
6461
initContainers:

deployments/helm/nvidia-device-plugin/templates/daemonset-gfd.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
{{- if .Values.gfd.enabled }}
1616
---
1717
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
18-
{{- $useServiceAccount := or $options.hasConfigMap .Values.gfd.enabled }}
1918
{{- $configMapName := (include "nvidia-device-plugin.configMapName" .) | trim }}
2019
{{- $daemonsetName := printf "%s-gpu-feature-discovery" (include "nvidia-device-plugin.fullname" .) | trunc 63 | trimSuffix "-" }}
2120
apiVersion: apps/v1
@@ -56,9 +55,7 @@ spec:
5655
{{- end }}
5756
securityContext:
5857
{{- toYaml .Values.podSecurityContext | nindent 8 }}
59-
{{- if $useServiceAccount }}
6058
serviceAccountName: {{ include "nvidia-device-plugin.fullname" . }}-service-account
61-
{{- end }}
6259
{{- if $options.hasConfigMap }}
6360
shareProcessNamespace: true
6461
{{- end }}

deployments/helm/nvidia-device-plugin/templates/daemonset-mps-control-daemon.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ spec:
5454
{{- end }}
5555
securityContext:
5656
{{- toYaml .Values.podSecurityContext | nindent 8 }}
57-
{{- if $options.hasConfigMap }}
5857
serviceAccountName: {{ include "nvidia-device-plugin.fullname" . }}-service-account
5958
{{- if not .Values.mps.enableHostPID }}
6059
shareProcessNamespace: true
6160
{{- end }}
62-
{{- end }}
6361
{{- if .Values.mps.enableHostPID }}
6462
hostPID: true
6563
{{- end }}

deployments/helm/nvidia-device-plugin/templates/role-binding.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
3-
{{- if or $options.hasConfigMap .Values.gfd.enabled }}
42
apiVersion: rbac.authorization.k8s.io/v1
53
kind: ClusterRoleBinding
64
metadata:
@@ -15,4 +13,3 @@ roleRef:
1513
kind: ClusterRole
1614
name: {{ include "nvidia-device-plugin.fullname" . }}-role
1715
apiGroup: rbac.authorization.k8s.io
18-
{{- end }}

deployments/helm/nvidia-device-plugin/templates/role.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
3-
{{- if or $options.hasConfigMap .Values.gfd.enabled }}
42
apiVersion: rbac.authorization.k8s.io/v1
53
kind: ClusterRole
64
metadata:
@@ -19,4 +17,3 @@ rules:
1917
resources: ["pods"]
2018
verbs: ["get"]
2119
{{- end }}
22-
{{- end }}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
{{- $options := (include "nvidia-device-plugin.options" . | fromJson) }}
3-
{{- if or $options.hasConfigMap .Values.gfd.enabled }}
42
apiVersion: v1
53
kind: ServiceAccount
64
metadata:
75
name: {{ include "nvidia-device-plugin.fullname" . }}-service-account
86
namespace: {{ include "nvidia-device-plugin.namespace" . }}
97
labels:
108
{{- include "nvidia-device-plugin.labels" . | nindent 4 }}
11-
{{- end }}

0 commit comments

Comments
 (0)