apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ include "neuron-device-plugin.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{ include "neuron-device-plugin.labels" . | indent 4 }} spec: updateStrategy: {{ toYaml .Values.updateStrategy | indent 4 }} selector: matchLabels: name: {{ include "neuron-device-plugin.fullname" . }}-ds template: metadata: {{- if .Values.podAnnotations }} annotations: {{- range $key, $value := .Values.podAnnotations }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} labels: name: {{ include "neuron-device-plugin.fullname" . }}-ds {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} {{- end }} spec: priorityClassName: "{{ .Values.priorityClassName }}" serviceAccountName: {{ template "neuron-device-plugin.serviceAccountName" . }} hostNetwork: true {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} containers: - image: {{ .Values.image.repository }}:{{ include "neuron-device-plugin.imageTag" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} name: neuron-device-plugin env: - name: KUBECONFIG value: /etc/kubernetes/kubelet.conf - name: NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] volumeMounts: - name: device-plugin mountPath: /var/lib/kubelet/device-plugins - name: infa-map mountPath: /run volumes: - name: device-plugin hostPath: path: /var/lib/kubelet/device-plugins - name: infa-map hostPath: path: /run