csi-mock-driver.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. kind: StatefulSet
  2. apiVersion: apps/v1
  3. metadata:
  4. name: csi-mockplugin
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: csi-mockplugin
  9. replicas: 1
  10. template:
  11. metadata:
  12. labels:
  13. app: csi-mockplugin
  14. spec:
  15. serviceAccountName: csi-mock
  16. containers:
  17. - name: csi-provisioner
  18. image: quay.io/k8scsi/csi-provisioner:v1.1.0
  19. args:
  20. - "--provisioner=csi-hostpath"
  21. - "--csi-address=$(ADDRESS)"
  22. - "--connection-timeout=15s"
  23. env:
  24. - name: ADDRESS
  25. value: /csi/csi.sock
  26. imagePullPolicy: Always
  27. volumeMounts:
  28. - mountPath: /csi
  29. name: socket-dir
  30. - name: driver-registrar
  31. image: quay.io/k8scsi/csi-node-driver-registrar:v1.1.0
  32. args:
  33. - --v=5
  34. - --csi-address=/csi/csi.sock
  35. - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-mock/csi.sock
  36. env:
  37. - name: KUBE_NODE_NAME
  38. valueFrom:
  39. fieldRef:
  40. apiVersion: v1
  41. fieldPath: spec.nodeName
  42. imagePullPolicy: Always
  43. securityContext:
  44. privileged: true
  45. volumeMounts:
  46. - mountPath: /csi
  47. name: socket-dir
  48. - mountPath: /registration
  49. name: registration-dir
  50. - name: mock
  51. image: quay.io/k8scsi/mock-driver:v1.1.1
  52. env:
  53. - name: CSI_ENDPOINT
  54. value: /csi/csi.sock
  55. - name: KUBE_NODE_NAME
  56. valueFrom:
  57. fieldRef:
  58. apiVersion: v1
  59. fieldPath: spec.nodeName
  60. securityContext:
  61. privileged: true
  62. imagePullPolicy: IfNotPresent
  63. volumeMounts:
  64. - mountPath: /csi
  65. name: socket-dir
  66. - mountPath: /var/lib/kubelet/pods
  67. mountPropagation: Bidirectional
  68. name: mountpoint-dir
  69. volumes:
  70. - hostPath:
  71. path: /var/lib/kubelet/plugins/csi-mock
  72. type: DirectoryOrCreate
  73. name: socket-dir
  74. - hostPath:
  75. path: /var/lib/kubelet/pods
  76. type: DirectoryOrCreate
  77. name: mountpoint-dir
  78. - hostPath:
  79. path: /var/lib/kubelet/plugins_registry
  80. type: Directory
  81. name: registration-dir