You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

csi-nodeplugin-rclone.yaml 3.5 kB

1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # This YAML file contains driver-registrar & csi driver nodeplugin API objects
  2. # that are necessary to run CSI nodeplugin for rclone
  3. kind: DaemonSet
  4. apiVersion: apps/v1
  5. metadata:
  6. name: csi-nodeplugin-rclone
  7. namespace: kube-system
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: csi-nodeplugin-rclone
  12. template:
  13. metadata:
  14. labels:
  15. app: csi-nodeplugin-rclone
  16. spec:
  17. serviceAccountName: csi-nodeplugin-rclone
  18. #hostNetwork: true
  19. #dnsPolicy: ClusterFirstWithHostNet
  20. dnsPolicy: Default
  21. containers:
  22. - name: node-driver-registrar
  23. #image: k8s.gcr.io/sig-storage/csi-node-driver-registrar:v2.4.0
  24. image: registry.cn-hangzhou.aliyuncs.com/google_containers/csi-node-driver-registrar:v2.4.0
  25. lifecycle:
  26. preStop:
  27. exec:
  28. command:
  29. [
  30. "/bin/sh",
  31. "-c",
  32. "rm -rf /registration/csi-rclone /registration/csi-rclone-reg.sock",
  33. ]
  34. args:
  35. - --v=5
  36. - --csi-address=/plugin/csi.sock
  37. - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-rclone/csi.sock
  38. env:
  39. - name: KUBE_NODE_NAME
  40. valueFrom:
  41. fieldRef:
  42. fieldPath: spec.nodeName
  43. volumeMounts:
  44. - name: plugin-dir
  45. mountPath: /plugin
  46. - name: registration-dir
  47. mountPath: /registration
  48. - name: rclone
  49. securityContext:
  50. privileged: true
  51. capabilities:
  52. add: ["SYS_ADMIN"]
  53. allowPrivilegeEscalation: true
  54. #image: dvcrn/csi-rclone-reloaded:v1.4.0
  55. image: 10.16.43.85:5010/csi-rclone-reloaded_arm64:v1.4.0
  56. args:
  57. - "/bin/csi-rclone-plugin"
  58. - "--nodeid=$(NODE_ID)"
  59. - "--endpoint=$(CSI_ENDPOINT)"
  60. # - "2>&1 > /opt/log/a.log"
  61. env:
  62. - name: NODE_ID
  63. valueFrom:
  64. fieldRef:
  65. fieldPath: spec.nodeName
  66. - name: CSI_ENDPOINT
  67. value: unix://plugin/csi.sock
  68. #- name: RCLONE_LOG_FILE
  69. # value: /opt/log/a.log
  70. #- name: RCLONE_LOG_LEVEL
  71. # value: DEBUG
  72. imagePullPolicy: "Always"
  73. lifecycle:
  74. postStart:
  75. exec:
  76. command:
  77. [
  78. "/bin/sh",
  79. "-c",
  80. "mount -t fuse.rclone | while read -r mount; do umount $(echo $mount | awk '{print $3}') ; done",
  81. ]
  82. volumeMounts:
  83. - name: plugin-dir
  84. mountPath: /plugin
  85. - name: pods-mount-dir
  86. mountPath: /var/lib/kubelet/pods
  87. mountPropagation: "Bidirectional"
  88. #- name: test-dir
  89. # mountPath: /opt/log
  90. volumes:
  91. - name: plugin-dir
  92. hostPath:
  93. path: /var/lib/kubelet/plugins/csi-rclone
  94. type: DirectoryOrCreate
  95. - name: pods-mount-dir
  96. hostPath:
  97. path: /var/lib/kubelet/pods
  98. type: Directory
  99. - hostPath:
  100. path: /var/lib/kubelet/plugins_registry
  101. type: DirectoryOrCreate
  102. name: registration-dir
  103. #- name: test-dir
  104. # hostPath:
  105. # path: /home/pcm/abc
  106. # type: DirectoryOrCreate

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。