2021-12-03 21:16:52 +00:00
|
|
|
# Node Service
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: ebs-csi-node
|
2022-05-04 12:25:29 +00:00
|
|
|
namespace: {{ .Release.Namespace }}
|
2021-12-03 21:16:52 +00:00
|
|
|
labels:
|
|
|
|
{{- include "aws-ebs-csi-driver.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: ebs-csi-node
|
|
|
|
{{- include "aws-ebs-csi-driver.selectorLabels" . | nindent 6 }}
|
|
|
|
updateStrategy:
|
|
|
|
{{- toYaml .Values.node.updateStrategy | nindent 4 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: ebs-csi-node
|
|
|
|
{{- include "aws-ebs-csi-driver.labels" . | nindent 8 }}
|
|
|
|
{{- if .Values.node.podLabels }}
|
|
|
|
{{- toYaml .Values.node.podLabels | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.node.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
2022-08-24 15:13:39 +00:00
|
|
|
{{- with .Values.node.affinity }}
|
|
|
|
affinity: {{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
nodeSelector:
|
|
|
|
kubernetes.io/os: linux
|
|
|
|
{{- with .Values.node.nodeSelector }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
serviceAccountName: {{ .Values.node.serviceAccount.name }}
|
|
|
|
priorityClassName: {{ .Values.node.priorityClassName | default "system-node-critical" }}
|
|
|
|
tolerations:
|
|
|
|
{{- if .Values.node.tolerateAllTaints }}
|
|
|
|
- operator: Exists
|
|
|
|
{{- else }}
|
|
|
|
{{- with .Values.node.tolerations }}
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2022-10-12 20:58:15 +00:00
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
{{- with .Values.node.securityContext }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
containers:
|
|
|
|
- name: ebs-plugin
|
|
|
|
image: {{ printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }}
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
|
|
args:
|
|
|
|
- node
|
|
|
|
- --endpoint=$(CSI_ENDPOINT)
|
|
|
|
{{- with .Values.node.volumeAttachLimit }}
|
|
|
|
- --volume-attach-limit={{ . }}
|
|
|
|
{{- end }}
|
|
|
|
- --logtostderr
|
|
|
|
- --v={{ .Values.node.logLevel }}
|
|
|
|
env:
|
|
|
|
- name: CSI_ENDPOINT
|
|
|
|
value: unix:/csi/csi.sock
|
|
|
|
- name: CSI_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
{{- if .Values.proxy.http_proxy }}
|
|
|
|
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.node.env }}
|
|
|
|
{{- . | toYaml | nindent 12 }}
|
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
envFrom:
|
|
|
|
{{- with .Values.controller.envFrom }}
|
|
|
|
{{- . | toYaml | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: kubelet-dir
|
2022-08-24 15:13:39 +00:00
|
|
|
mountPath: {{ .Values.node.kubeletPath }}
|
2021-12-03 21:16:52 +00:00
|
|
|
mountPropagation: "Bidirectional"
|
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: device-dir
|
|
|
|
mountPath: /dev
|
|
|
|
ports:
|
|
|
|
- name: healthz
|
|
|
|
containerPort: 9808
|
|
|
|
protocol: TCP
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /healthz
|
|
|
|
port: healthz
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
timeoutSeconds: 3
|
|
|
|
periodSeconds: 10
|
|
|
|
failureThreshold: 5
|
|
|
|
{{- with .Values.node.resources }}
|
|
|
|
resources:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
{{- with .Values.node.containerSecurityContext }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
- name: node-driver-registrar
|
|
|
|
image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrar.image.repository .Values.sidecars.nodeDriverRegistrar.image.tag }}
|
|
|
|
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.nodeDriverRegistrar.image.pullPolicy }}
|
|
|
|
args:
|
|
|
|
- --csi-address=$(ADDRESS)
|
|
|
|
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
|
|
|
|
- --v={{ .Values.sidecars.nodeDriverRegistrar.logLevel }}
|
|
|
|
env:
|
|
|
|
- name: ADDRESS
|
|
|
|
value: /csi/csi.sock
|
|
|
|
- name: DRIVER_REG_SOCK_PATH
|
2022-08-24 15:13:39 +00:00
|
|
|
value: {{ printf "%s/plugins/ebs.csi.aws.com/csi.sock" (trimSuffix "/" .Values.node.kubeletPath) }}
|
2021-12-03 21:16:52 +00:00
|
|
|
{{- if .Values.proxy.http_proxy }}
|
|
|
|
{{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.sidecars.nodeDriverRegistrar.env }}
|
|
|
|
{{- . | toYaml | nindent 12 }}
|
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
envFrom:
|
|
|
|
{{- with .Values.controller.envFrom }}
|
|
|
|
{{- . | toYaml | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /csi
|
|
|
|
- name: registration-dir
|
|
|
|
mountPath: /registration
|
|
|
|
{{- with default .Values.node.resources .Values.sidecars.nodeDriverRegistrar.resources }}
|
|
|
|
resources:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
{{- with .Values.sidecars.nodeDriverRegistrar.securityContext }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
- name: liveness-probe
|
|
|
|
image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }}
|
|
|
|
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.sidecars.livenessProbe.image.pullPolicy }}
|
|
|
|
args:
|
|
|
|
- --csi-address=/csi/csi.sock
|
2022-08-24 15:13:39 +00:00
|
|
|
envFrom:
|
|
|
|
{{- with .Values.controller.envFrom }}
|
|
|
|
{{- . | toYaml | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: plugin-dir
|
|
|
|
mountPath: /csi
|
|
|
|
{{- with default .Values.node.resources .Values.sidecars.livenessProbe.resources }}
|
|
|
|
resources:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2022-08-24 15:13:39 +00:00
|
|
|
{{- with .Values.sidecars.livenessProbe.securityContext }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml . | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-12-03 21:16:52 +00:00
|
|
|
{{- if .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- range .Values.imagePullSecrets }}
|
|
|
|
- name: {{ . }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
volumes:
|
|
|
|
- name: kubelet-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ .Values.node.kubeletPath }}
|
|
|
|
type: Directory
|
|
|
|
- name: plugin-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ printf "%s/plugins/ebs.csi.aws.com/" (trimSuffix "/" .Values.node.kubeletPath) }}
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: registration-dir
|
|
|
|
hostPath:
|
|
|
|
path: {{ printf "%s/plugins_registry/" (trimSuffix "/" .Values.node.kubeletPath) }}
|
|
|
|
type: Directory
|
|
|
|
- name: device-dir
|
|
|
|
hostPath:
|
|
|
|
path: /dev
|
|
|
|
type: Directory
|