|
| 1 | +# This YAML file contains driver-registrar & csi driver nodeplugin API objects, |
| 2 | +# which are necessary to run csi nodeplugin for cinder. |
| 3 | + |
| 4 | +kind: DaemonSet |
| 5 | +apiVersion: apps/v1beta2 |
| 6 | +metadata: |
| 7 | + name: csi-nodeplugin-cinderplugin |
| 8 | +spec: |
| 9 | + selector: |
| 10 | + matchLabels: |
| 11 | + app: csi-nodeplugin-cinderplugin |
| 12 | + template: |
| 13 | + metadata: |
| 14 | + labels: |
| 15 | + app: csi-nodeplugin-cinderplugin |
| 16 | + spec: |
| 17 | + serviceAccount: csi-nodeplugin |
| 18 | + hostNetwork: true |
| 19 | + containers: |
| 20 | + - name: driver-registrar |
| 21 | + image: docker.io/k8scsi/driver-registrar |
| 22 | + args: |
| 23 | + - "--v=5" |
| 24 | + - "--csi-address=$(ADDRESS)" |
| 25 | + env: |
| 26 | + - name: ADDRESS |
| 27 | + value: /plugin/csi.sock |
| 28 | + - name: KUBE_NODE_NAME |
| 29 | + valueFrom: |
| 30 | + fieldRef: |
| 31 | + fieldPath: spec.nodeName |
| 32 | + volumeMounts: |
| 33 | + - name: plugin-dir |
| 34 | + mountPath: /plugin |
| 35 | + - name: cinder |
| 36 | + securityContext: |
| 37 | + privileged: true |
| 38 | + capabilities: |
| 39 | + add: ["SYS_ADMIN"] |
| 40 | + allowPrivilegeEscalation: true |
| 41 | + image: docker.io/k8scsi/cinderplugin |
| 42 | + args : |
| 43 | + - "--nodeid=$(NODE_ID)" |
| 44 | + - "--endpoint=$(CSI_ENDPOINT)" |
| 45 | + - "--cloud-config=$(CLOUD_CONFIG)" |
| 46 | + env: |
| 47 | + - name: NODE_ID |
| 48 | + valueFrom: |
| 49 | + fieldRef: |
| 50 | + fieldPath: spec.nodeName |
| 51 | + - name: CSI_ENDPOINT |
| 52 | + value: unix://plugin/csi.sock |
| 53 | + - name: CLOUD_CONFIG |
| 54 | + value: /etc/config/cloud.conf |
| 55 | + imagePullPolicy: "IfNotPresent" |
| 56 | + volumeMounts: |
| 57 | + - name: plugin-dir |
| 58 | + mountPath: /plugin |
| 59 | + - name: pods-mount-dir |
| 60 | + mountPath: /var/lib/kubelet/pods |
| 61 | + mountPropagation: "Bidirectional" |
| 62 | + - name: pods-cloud-data |
| 63 | + mountPath: /var/lib/cloud/data |
| 64 | + readOnly: true |
| 65 | + - name: pods-probe-dir |
| 66 | + mountPath: /dev |
| 67 | + mountPropagation: "HostToContainer" |
| 68 | + - name: secret-cinderplugin |
| 69 | + mountPath: /etc/config |
| 70 | + readOnly: true |
| 71 | + volumes: |
| 72 | + - name: plugin-dir |
| 73 | + hostPath: |
| 74 | + path: /var/lib/kubelet/plugins/csi-cinderplugin |
| 75 | + type: DirectoryOrCreate |
| 76 | + - name: pods-mount-dir |
| 77 | + hostPath: |
| 78 | + path: /var/lib/kubelet/pods |
| 79 | + type: Directory |
| 80 | + - name: pods-cloud-data |
| 81 | + hostPath: |
| 82 | + path: /var/lib/cloud/data |
| 83 | + type: Directory |
| 84 | + - name: pods-probe-dir |
| 85 | + hostPath: |
| 86 | + path: /dev |
| 87 | + type: Directory |
| 88 | + - name: secret-cinderplugin |
| 89 | + secret: |
| 90 | + secretName: csi-secret-cinderplugin |
0 commit comments