csi-node-daemonset.yaml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. kind: DaemonSet
  17. apiVersion: apps/v1beta2
  18. metadata:
  19. name: csi-node
  20. spec:
  21. selector:
  22. matchLabels:
  23. app: csi-node
  24. template:
  25. metadata:
  26. labels:
  27. app: csi-node
  28. spec:
  29. serviceAccount: csi-ozone
  30. containers:
  31. - name: driver-registrar
  32. image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
  33. args:
  34. - --v=4
  35. - --csi-address=/var/lib/csi/csi.sock
  36. - --kubelet-registration-path=/var/lib/kubelet/plugins/org.apache.hadoop.ozone/csi.sock
  37. env:
  38. - name: KUBE_NODE_NAME
  39. valueFrom:
  40. fieldRef:
  41. fieldPath: spec.nodeName
  42. volumeMounts:
  43. - name: plugin-dir
  44. mountPath: /var/lib/csi
  45. - name: registration-dir
  46. mountPath: /registration/
  47. - name: csi-node
  48. image: '@docker.image@'
  49. securityContext:
  50. runAsUser: 0
  51. privileged: true
  52. capabilities:
  53. add:
  54. - SYS_ADMIN
  55. allowPrivilegeEscalation: true
  56. args:
  57. - ozone
  58. - csi
  59. envFrom:
  60. - configMapRef:
  61. name: config
  62. imagePullPolicy: Always
  63. volumeMounts:
  64. - name: plugin-dir
  65. mountPath: /var/lib/csi
  66. - name: pods-mount-dir
  67. mountPath: /var/lib/kubelet/pods
  68. mountPropagation: Bidirectional
  69. - name: fuse-device
  70. mountPath: /dev/fuse
  71. - name: dbus
  72. mountPath: /var/run/dbus
  73. - name: systemd
  74. mountPath: /run/systemd
  75. volumes:
  76. - name: plugin-dir
  77. hostPath:
  78. path: /var/lib/kubelet/plugins/org.apache.hadoop.ozone
  79. type: DirectoryOrCreate
  80. - name: registration-dir
  81. hostPath:
  82. path: /var/lib/kubelet/plugins_registry/
  83. type: DirectoryOrCreate
  84. - name: pods-mount-dir
  85. hostPath:
  86. path: /var/lib/kubelet/pods
  87. type: Directory
  88. - name: fuse-device
  89. hostPath:
  90. path: /dev/fuse
  91. - name: dbus
  92. hostPath:
  93. path: /var/run/dbus
  94. - name: systemd
  95. hostPath:
  96. path: /run/systemd