{{- if .Values.controller.create }} # Controller Service kind: Deployment apiVersion: apps/v1 metadata: name: efs-csi-controller labels: app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app: efs-csi-controller app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app: efs-csi-controller app.kubernetes.io/name: {{ include "aws-efs-csi-driver.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Values.node.podAnnotations }} annotations: {{ toYaml .Values.node.podAnnotations | nindent 8 }} {{- end }} spec: {{- if .Values.imagePullSecrets }} imagePullSecrets: {{- range .Values.imagePullSecrets }} - name: {{ . }} {{- end }} {{- end }} nodeSelector: kubernetes.io/os: linux {{- with .Values.nodeSelector }} {{- . | toYaml | nindent 8 }} {{- end }} {{- if .Values.serviceAccount.controller.create }} serviceAccountName: {{ include "aws-efs-csi-driver.serviceAccountName" . }} {{- end }} priorityClassName: system-cluster-critical tolerations: - operator: Exists {{- with .Values.node.tolerations }} {{- . | toYaml | nindent 8 }} {{- end }} containers: - name: efs-plugin securityContext: privileged: true image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: IfNotPresent args: - --endpoint=$(CSI_ENDPOINT) - --logtostderr - --v=5 # Uncomment below line to allow access point root directory to be deleted by controller. #- --delete-access-point-root-dir env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ ports: - name: healthz containerPort: 9808 protocol: TCP livenessProbe: httpGet: path: /healthz port: healthz initialDelaySeconds: 10 timeoutSeconds: 3 periodSeconds: 10 failureThreshold: 5 - name: csi-provisioner image: {{ printf "%s:%s" .Values.sidecars.csiProvisionerImage.repository .Values.sidecars.csiProvisionerImage.tag }} args: - --csi-address=$(ADDRESS) - --v=5 - --feature-gates=Topology=true - --leader-election env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - name: liveness-probe image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }} args: - --csi-address=/csi/csi.sock - --health-port=9808 volumeMounts: - name: socket-dir mountPath: /csi volumes: - name: socket-dir emptyDir: {} {{- end }}