-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnode-daemonset.yaml
More file actions
187 lines (183 loc) · 5.69 KB
/
node-daemonset.yaml
File metadata and controls
187 lines (183 loc) · 5.69 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cloudstack-csi-node
namespace: kube-system
spec:
selector:
matchLabels:
app.kubernetes.io/name: cloudstack-csi-node
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: "10%"
template:
metadata:
labels:
app.kubernetes.io/name: cloudstack-csi-node
app.kubernetes.io/part-of: cloudstack-csi-driver
spec:
priorityClassName: system-node-critical
serviceAccountName: cloudstack-csi-node
nodeSelector:
kubernetes.io/os: linux
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
tolerationSeconds: 300
securityContext:
runAsNonRoot: false
runAsUser: 0
runAsGroup: 0
fsGroup: 0
containers:
- name: cloudstack-csi-node
image: ghcr.io/shapeblue/cloudstack-csi-driver:master
imagePullPolicy: IfNotPresent
args:
- "node"
- "--endpoint=$(CSI_ENDPOINT)"
- "--cloudstack-config=/etc/cloudstack-csi-driver/cloud-config"
- "--logging-format=text"
- "--node-name=$(NODE_NAME)"
- "--v=4"
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: kubelet-dir
mountPath: /var/lib/kubelet
# needed so that any mounts setup inside this container are
# propagated back to the host machine.
mountPropagation: Bidirectional
- name: device-dir
mountPath: /dev
- name: cloud-init-dir
mountPath: /run/cloud-init/
# Comment the above 2 lines and uncomment the next 2 lines for Ignition support
# - name: ignition-dir
# mountPath: /run/metadata
- name: cloudstack-conf
mountPath: /etc/cloudstack-csi-driver
ports:
- name: healthz
containerPort: 9808
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 5
resources:
limits:
cpu: "200m"
memory: 200Mi
requests:
cpu: "50m"
memory: 50Mi
securityContext:
# readOnlyRootFilesystem: true
privileged: true
- name: node-driver-registrar
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.10.1
imagePullPolicy: IfNotPresent
args:
- "--csi-address=$(ADDRESS)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
- "--v=5"
- "--health-port=9809"
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/csi.cloudstack.apache.org/csi.sock
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
ports:
- containerPort: 9809
name: healthz
livenessProbe:
exec:
command:
- /csi-node-driver-registrar
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --mode=kubelet-registration-probe
initialDelaySeconds: 30
periodSeconds: 90
timeoutSeconds: 15
resources:
limits:
cpu: "200m"
memory: 200Mi
requests:
cpu: "50m"
memory: 50Mi
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
- name: liveness-probe
image: registry.k8s.io/sig-storage/livenessprobe:v2.12.0
imagePullPolicy: IfNotPresent
args:
- "--v=4"
- "--csi-address=$(ADDRESS)"
env:
- name: ADDRESS
value: /csi/csi.sock
volumeMounts:
- name: plugin-dir
mountPath: /csi
resources:
limits:
cpu: "200m"
memory: 250Mi
requests:
cpu: "50m"
memory: 50Mi
securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
volumes:
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/csi.cloudstack.apache.org/
type: DirectoryOrCreate
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
type: Directory
- name: device-dir
hostPath:
path: /dev
type: Directory
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry
type: Directory
- name: cloud-init-dir
hostPath:
path: /run/cloud-init/
type: Directory
# Comment the above 4 lines and uncomment the next 4 lines for Ignition support
# - name: ignition-dir
# hostPath:
# path: /run/metadata
# type: Directory
- name: cloudstack-conf
secret:
secretName: cloudstack-secret