node_ds.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. kind: DaemonSet
  2. apiVersion: apps/v1
  3. metadata:
  4. name: csi-gce-pd-node
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: gcp-compute-persistent-disk-csi-driver
  9. template:
  10. metadata:
  11. labels:
  12. app: gcp-compute-persistent-disk-csi-driver
  13. spec:
  14. containers:
  15. - name: csi-driver-registrar
  16. image: gcr.io/gke-release/csi-node-driver-registrar:v1.2.0-gke.0
  17. args:
  18. - "--v=5"
  19. - "--csi-address=/csi/csi.sock"
  20. - "--kubelet-registration-path=/var/lib/kubelet/plugins/pd.csi.storage.gke.io/csi.sock"
  21. lifecycle:
  22. preStop:
  23. exec:
  24. command: ["/bin/sh", "-c", "rm -rf /registration/pd.csi.storage.gke.io /registration/pd.csi.storage.gke.io-reg.sock"]
  25. env:
  26. - name: KUBE_NODE_NAME
  27. valueFrom:
  28. fieldRef:
  29. fieldPath: spec.nodeName
  30. volumeMounts:
  31. - name: plugin-dir
  32. mountPath: /csi
  33. - name: registration-dir
  34. mountPath: /registration
  35. - name: gce-pd-driver
  36. securityContext:
  37. privileged: true
  38. image: gcr.io/gke-release/gcp-compute-persistent-disk-csi-driver:v0.6.0-gke.0
  39. args:
  40. - "--v=5"
  41. - "--endpoint=unix:/csi/csi.sock"
  42. volumeMounts:
  43. - name: kubelet-dir
  44. mountPath: /var/lib/kubelet
  45. mountPropagation: "Bidirectional"
  46. - name: plugin-dir
  47. mountPath: /csi
  48. - name: device-dir
  49. mountPath: /dev
  50. # The following mounts are required to trigger host udevadm from container
  51. - name: udev-rules-etc
  52. mountPath: /etc/udev
  53. - name: udev-rules-lib
  54. mountPath: /lib/udev
  55. - name: udev-socket
  56. mountPath: /run/udev
  57. - name: sys
  58. mountPath: /sys
  59. volumes:
  60. - name: registration-dir
  61. hostPath:
  62. path: /var/lib/kubelet/plugins_registry/
  63. type: Directory
  64. - name: kubelet-dir
  65. hostPath:
  66. path: /var/lib/kubelet
  67. type: Directory
  68. - name: plugin-dir
  69. hostPath:
  70. path: /var/lib/kubelet/plugins/pd.csi.storage.gke.io/
  71. type: DirectoryOrCreate
  72. - name: device-dir
  73. hostPath:
  74. path: /dev
  75. type: Directory
  76. # The following mounts are required to trigger host udevadm from container
  77. - name: udev-rules-etc
  78. hostPath:
  79. path: /etc/udev
  80. type: Directory
  81. - name: udev-rules-lib
  82. hostPath:
  83. path: /lib/udev
  84. type: Directory
  85. - name: udev-socket
  86. hostPath:
  87. path: /run/udev
  88. type: Directory
  89. - name: sys
  90. hostPath:
  91. path: /sys
  92. type: Directory