apiVersion: apps/v1 kind: DaemonSet metadata: name: {{ include "aws-efa-k8s-device-plugin.fullname" . }} labels: {{- include "aws-efa-k8s-device-plugin.labels" . | nindent 4 }} spec: selector: matchLabels: name: {{ include "aws-efa-k8s-device-plugin.fullname" . }} updateStrategy: type: RollingUpdate template: metadata: # This annotation is deprecated. Kept here for backward compatibility # See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ annotations: scheduler.alpha.kubernetes.io/critical-pod: "" {{- with .Values.additionalPodAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: name: {{ include "aws-efa-k8s-device-plugin.fullname" . }} {{- with .Values.additionalPodLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} # Mark this pod as a critical add-on; when enabled, the critical add-on # scheduler reserves resources for critical add-on pods so that they can # be rescheduled after a failure. # See https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ priorityClassName: "system-node-critical" {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: {{- range .Values.supportedInstanceLabels.keys }} - matchExpressions: - key: {{ . }} operator: In values: {{- toYaml $.Values.supportedInstanceLabels.values | nindent 20 }} {{- end }} hostNetwork: true containers: - image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }} imagePullPolicy: Always name: aws-efa-k8s-device-plugin securityContext: {{- toYaml .Values.securityContext | nindent 12}} {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: - name: device-plugin mountPath: /var/lib/kubelet/device-plugins volumes: - name: device-plugin hostPath: path: /var/lib/kubelet/device-plugins