-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathnodeplugin.yaml
156 lines (156 loc) · 5.72 KB
/
nodeplugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "warm-metal-csi-driver.fullname" . }}-nodeplugin
labels:
{{- include "warm-metal-csi-driver.nodeplugin.labels" . | nindent 4 }}
spec:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: "10%"
selector:
matchLabels:
{{- include "warm-metal-csi-driver.nodeplugin.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "warm-metal-csi-driver.nodeplugin.labels" . | nindent 8 }}
spec:
containers:
- name: node-driver-registrar
args:
- "--csi-address=/csi/csi.sock"
- --kubelet-registration-path={{ .Values.kubeletRoot }}/plugins/container-image.csi.k8s.io/csi.sock
- "-v={{ .Values.logLevel }}"
env:
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: "{{ .Values.csiNodeDriverRegistrar.image.repository }}:{{ .Values.csiNodeDriverRegistrar.image.tag }}"
imagePullPolicy: {{ .Values.csiNodeDriverRegistrar.image.pullPolicy }}
{{- with .Values.csiNodeDriverRegistrar.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /registration
name: registration-dir
- name: liveness-probe
image: "{{ .Values.csiLivenessProbe.image.repository }}:{{ .Values.csiLivenessProbe.image.tag }}"
imagePullPolicy: {{ .Values.csiLivenessProbe.image.pullPolicy }}
args:
- "--csi-address=/csi/csi.sock"
- "--http-endpoint=:9809"
- "-v={{ .Values.logLevel }}"
{{- with .Values.csiLivenessProbe.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /csi
name: socket-dir
- name: csi-plugin
args:
- --endpoint=$(CSI_ENDPOINT)
- --node=$(KUBE_NODE_NAME)
- --runtime-addr=$(CRI_ADDR)
- --node-plugin-sa={{ include "warm-metal-csi-driver.fullname" . }}-nodeplugin
{{- if .Values.enableDaemonImageCredentialCache }}
- --enable-daemon-image-credential-cache
{{- end }}
{{- if .Values.enableAsyncPull }}
- --async-pull-timeout={{ .Values.asyncPullTimeout }}
{{- end }}
- "-v={{ .Values.logLevel }}"
- "--mode=node"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: CRI_ADDR
value: {{ .Values.runtime.engine }}://{{ .Values.runtime.socketPath }}
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{{- with .Values.csiPlugin.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.csiPlugin.image.repository }}:{{ .Values.csiPlugin.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.csiPlugin.image.pullPolicy }}
ports:
- containerPort: 9809
name: metrics
protocol: TCP
- containerPort: 8080
name: metrics2
protocol: TCP
livenessProbe:
{{- toYaml .Values.csiPlugin.livenessProbe | nindent 12}}
securityContext:
privileged: true
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: {{ .Values.kubeletRoot }}/pods
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: {{ .Values.runtime.socketPath }}
name: runtime-socket
- mountPath: {{ .Values.snapshotRoot }}
mountPropagation: Bidirectional
name: snapshot-root-0
{{- if .Values.crioRuntimeRoot }}
- mountPath: {{ .Values.crioRuntimeRoot }}
mountPropagation: Bidirectional
name: crio-runtime-root
{{- end }}
{{- if .Values.crioMountProgram }}
- mountPath: {{ .Values.crioMountProgram }}
name: crio-mount-program
{{- end }}
hostNetwork: {{.Values.csiPlugin.hostNetwork}}
serviceAccountName: {{ include "warm-metal-csi-driver.fullname" . }}-nodeplugin
volumes:
- hostPath:
path: {{ .Values.kubeletRoot }}/plugins/container-image.csi.k8s.io
type: DirectoryOrCreate
name: socket-dir
- hostPath:
path: {{ .Values.kubeletRoot }}/pods
type: DirectoryOrCreate
name: mountpoint-dir
- hostPath:
path: {{ .Values.kubeletRoot }}/plugins_registry
type: Directory
name: registration-dir
- hostPath:
path: {{ .Values.runtime.socketPath }}
type: Socket
name: runtime-socket
{{- if .Values.crioRuntimeRoot }}
- hostPath:
path: {{ .Values.crioRuntimeRoot }}
type: Directory
name: crio-runtime-root
{{- end }}
{{- if .Values.crioMountProgram }}
- hostPath:
path: {{ .Values.crioMountProgram }}
type: File
name: crio-mount-program
{{- end }}
- hostPath:
path: {{ .Values.snapshotRoot }}
type: Directory
name: snapshot-root-0
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}