csi-hostpathplugin.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. kind: DaemonSet
  2. apiVersion: apps/v1
  3. metadata:
  4. name: csi-hostpathplugin
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: csi-hostpathplugin
  9. template:
  10. metadata:
  11. labels:
  12. app: csi-hostpathplugin
  13. spec:
  14. serviceAccountName: csi-node-sa
  15. hostNetwork: true
  16. containers:
  17. - name: driver-registrar
  18. image: quay.io/k8scsi/driver-registrar:v0.4.1
  19. args:
  20. - --v=5
  21. - --csi-address=/csi/csi.sock
  22. - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-hostpath-v0/csi.sock
  23. env:
  24. - name: KUBE_NODE_NAME
  25. valueFrom:
  26. fieldRef:
  27. apiVersion: v1
  28. fieldPath: spec.nodeName
  29. imagePullPolicy: Always
  30. volumeMounts:
  31. - mountPath: /csi
  32. name: socket-dir
  33. - mountPath: /registration
  34. name: registration-dir
  35. - name: hostpath
  36. image: quay.io/k8scsi/hostpathplugin:v0.4.1
  37. args:
  38. - "--v=5"
  39. - "--endpoint=$(CSI_ENDPOINT)"
  40. - "--nodeid=$(KUBE_NODE_NAME)"
  41. env:
  42. - name: CSI_ENDPOINT
  43. value: unix:///csi/csi.sock
  44. - name: KUBE_NODE_NAME
  45. valueFrom:
  46. fieldRef:
  47. apiVersion: v1
  48. fieldPath: spec.nodeName
  49. imagePullPolicy: Always
  50. securityContext:
  51. privileged: true
  52. volumeMounts:
  53. - mountPath: /csi
  54. name: socket-dir
  55. - mountPath: /var/lib/kubelet/pods
  56. mountPropagation: Bidirectional
  57. name: mountpoint-dir
  58. volumes:
  59. - hostPath:
  60. path: /var/lib/kubelet/plugins/csi-hostpath-v0
  61. type: DirectoryOrCreate
  62. name: socket-dir
  63. - hostPath:
  64. path: /var/lib/kubelet/pods
  65. type: DirectoryOrCreate
  66. name: mountpoint-dir
  67. - hostPath:
  68. path: /var/lib/kubelet/plugins
  69. type: Directory
  70. name: registration-dir