|
16 | 16 | # are needed only because of condition explained in
|
17 | 17 | # https://github.com/kubernetes/kubernetes/issues/69608
|
18 | 18 |
|
19 |
| -kind: Service |
20 |
| -apiVersion: v1 |
21 |
| -metadata: |
22 |
| - name: csi-hostpathplugin |
23 |
| - namespace: kube-system |
24 |
| - labels: |
25 |
| - app: csi-hostpathplugin |
26 |
| - addonmanager.kubernetes.io/mode: Reconcile |
27 |
| -spec: |
28 |
| - selector: |
29 |
| - app: csi-hostpathplugin |
30 |
| - ports: |
31 |
| - - name: dummy |
32 |
| - port: 12345 |
33 |
| ---- |
34 |
| -kind: StatefulSet |
| 19 | +kind: DaemonSet |
35 | 20 | apiVersion: apps/v1
|
36 | 21 | metadata:
|
37 | 22 | name: csi-hostpathplugin
|
38 | 23 | namespace: kube-system
|
39 | 24 | labels:
|
| 25 | + app.kubernetes.io/instance: hostpath.csi.k8s.io |
| 26 | + app.kubernetes.io/part-of: csi-driver-host-path |
| 27 | + app.kubernetes.io/name: csi-hostpathplugin |
| 28 | + app.kubernetes.io/component: plugin |
40 | 29 | addonmanager.kubernetes.io/mode: Reconcile
|
41 | 30 | spec:
|
42 |
| - serviceName: "csi-hostpathplugin" |
43 |
| - # One replica only: |
44 |
| - # Host path driver only works when everything runs |
45 |
| - # on a single node. We achieve that by starting it once and then |
46 |
| - # co-locate all other pods via inter-pod affinity |
47 |
| - replicas: 1 |
48 | 31 | selector:
|
49 | 32 | matchLabels:
|
50 |
| - app: csi-hostpathplugin |
| 33 | + app.kubernetes.io/instance: hostpath.csi.k8s.io |
| 34 | + app.kubernetes.io/part-of: csi-driver-host-path |
| 35 | + app.kubernetes.io/name: csi-hostpathplugin |
| 36 | + app.kubernetes.io/component: plugin |
51 | 37 | addonmanager.kubernetes.io/mode: Reconcile
|
52 | 38 | template:
|
53 | 39 | metadata:
|
54 | 40 | labels:
|
55 |
| - app: csi-hostpathplugin |
| 41 | + app.kubernetes.io/instance: hostpath.csi.k8s.io |
| 42 | + app.kubernetes.io/part-of: csi-driver-host-path |
| 43 | + app.kubernetes.io/name: csi-hostpathplugin |
| 44 | + app.kubernetes.io/component: plugin |
56 | 45 | addonmanager.kubernetes.io/mode: Reconcile
|
57 | 46 | kubernetes.io/minikube-addons: csi-hostpath-driver
|
58 | 47 | spec:
|
59 |
| - serviceAccount: csi-external-health-monitor-controller |
| 48 | + serviceAccount: csi-hostpathplugin-sa |
60 | 49 | containers:
|
61 |
| - - name: csi-external-health-monitor-agent |
62 |
| - image: {{.CustomRegistries.HostMonitorAgent | default .ImageRepository | default .Registries.HostMonitorAgent }}{{.Images.HostMonitorAgent}} |
63 |
| - args: |
64 |
| - - "--v=5" |
65 |
| - - "--csi-address=$(ADDRESS)" |
66 |
| - env: |
67 |
| - - name: NODE_NAME |
68 |
| - valueFrom: |
69 |
| - fieldRef: |
70 |
| - fieldPath: spec.nodeName |
71 |
| - - name: ADDRESS |
72 |
| - value: /csi/csi.sock |
73 |
| - imagePullPolicy: "IfNotPresent" |
74 |
| - volumeMounts: |
75 |
| - - name: socket-dir |
76 |
| - mountPath: /csi |
77 | 50 | - name: csi-external-health-monitor-controller
|
78 | 51 | image: {{.CustomRegistries.HostMonitorController | default .ImageRepository | default .Registries.HostMonitorController }}{{.Images.HostMonitorController}}
|
79 | 52 | args:
|
@@ -163,6 +136,62 @@ spec:
|
163 | 136 | - --csi-address=/csi/csi.sock
|
164 | 137 | - --health-port=9898
|
165 | 138 |
|
| 139 | + - name: csi-provisioner |
| 140 | + image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0 |
| 141 | + args: |
| 142 | + - -v=5 |
| 143 | + - --csi-address=/csi/csi.sock |
| 144 | + - --feature-gates=Topology=true |
| 145 | + - --enable-capacity |
| 146 | + - --capacity-ownerref-level=0 # pod is owner |
| 147 | + - --node-deployment=true |
| 148 | + - --strict-topology=true |
| 149 | + - --immediate-topology=false |
| 150 | + - --worker-threads=5 |
| 151 | + env: |
| 152 | + - name: NODE_NAME |
| 153 | + valueFrom: |
| 154 | + fieldRef: |
| 155 | + apiVersion: v1 |
| 156 | + fieldPath: spec.nodeName |
| 157 | + - name: NAMESPACE |
| 158 | + valueFrom: |
| 159 | + fieldRef: |
| 160 | + fieldPath: metadata.namespace |
| 161 | + - name: POD_NAME |
| 162 | + valueFrom: |
| 163 | + fieldRef: |
| 164 | + fieldPath: metadata.name |
| 165 | + securityContext: |
| 166 | + # This is necessary only for systems with SELinux, where |
| 167 | + # non-privileged sidecar containers cannot access unix domain socket |
| 168 | + # created by privileged CSI driver container. |
| 169 | + privileged: true |
| 170 | + volumeMounts: |
| 171 | + - mountPath: /csi |
| 172 | + name: socket-dir |
| 173 | + |
| 174 | + - name: csi-snapshotter |
| 175 | + image: {{.CustomRegistries.Snapshotter | default .ImageRepository | default .Registries.Snapshotter }}{{.Images.Snapshotter}} |
| 176 | + args: |
| 177 | + - -v=5 |
| 178 | + - --csi-address=/csi/csi.sock |
| 179 | + - --node-deployment |
| 180 | + env: |
| 181 | + - name: NODE_NAME |
| 182 | + valueFrom: |
| 183 | + fieldRef: |
| 184 | + apiVersion: v1 |
| 185 | + fieldPath: spec.nodeName |
| 186 | + securityContext: |
| 187 | + # This is necessary only for systems with SELinux, where |
| 188 | + # non-privileged sidecar containers cannot access unix domain socket |
| 189 | + # created by privileged CSI driver container. |
| 190 | + privileged: true |
| 191 | + volumeMounts: |
| 192 | + - mountPath: /csi |
| 193 | + name: socket-dir |
| 194 | + |
166 | 195 | volumes:
|
167 | 196 | - hostPath:
|
168 | 197 | path: /var/lib/kubelet/plugins/csi-hostpath
|
|
0 commit comments