|
1 |
| -# csi-proxy |
| 1 | +# CSI Proxy |
2 | 2 |
|
3 |
| -CSI Proxy utility to enable CSI Plugins on Windows. |
| 3 | +CSI Proxy is a binary that exposes a set of gRPC APIs around storage operations |
| 4 | +over named pipes in Windows. A container, such as CSI node plugins, can mount |
| 5 | +the named pipes depending on operations it wants to exercise on the host and |
| 6 | +invoke the APIs. |
| 7 | + |
| 8 | +Each named pipe will support a specific version of an API (e.g. v1alpha1, v2beta1) |
| 9 | +that targets a specific area of storage (e.g. disk, volume, file, SMB, iSCSI). |
| 10 | + |
| 11 | +## Usage in a Kubernetes DaemonSet |
| 12 | + |
| 13 | +Deploy and start csiproxy.exe on all Windows hosts in the cluster. Next, the named |
| 14 | +pipes can be mounted in a CSI node plugin DaemonSet YAML in the following manner: |
| 15 | + |
| 16 | +``` |
| 17 | +kind: DaemonSet |
| 18 | +apiVersion: apps/v1 |
| 19 | +metadata: |
| 20 | + name: csi-storage-node-win |
| 21 | +spec: |
| 22 | + selector: |
| 23 | + matchLabels: |
| 24 | + app: csi-driver-win |
| 25 | + template: |
| 26 | + metadata: |
| 27 | + labels: |
| 28 | + app: csi-driver-win |
| 29 | + spec: |
| 30 | + serviceAccountName: csi-node-sa |
| 31 | + tolerations: |
| 32 | + - key: "node.kubernetes.io/os" |
| 33 | + operator: "Equal" |
| 34 | + value: "win1809" |
| 35 | + effect: "NoSchedule" |
| 36 | + nodeSelector: |
| 37 | + kubernetes.io/os: windows |
| 38 | + containers: |
| 39 | + - name: csi-driver-registrar |
| 40 | + image: gke.gcr.io/csi-node-driver-registrar:win-v1 |
| 41 | + args: |
| 42 | + - "--v=5" |
| 43 | + - "--csi-address=unix://C:\\csi\\csi.sock" |
| 44 | + - "--kubelet-registration-path=C:\\var\\lib\\kubelet\\plugins\\pd.csi.storage.gke.io\\csi.sock" |
| 45 | + env: |
| 46 | + - name: KUBE_NODE_NAME |
| 47 | + valueFrom: |
| 48 | + fieldRef: |
| 49 | + fieldPath: spec.nodeName |
| 50 | + volumeMounts: |
| 51 | + - name: plugin-dir |
| 52 | + mountPath: C:\csi |
| 53 | + - name: registration-dir |
| 54 | + mountPath: C:\registration |
| 55 | + - name: csi-driver |
| 56 | + image: org/csi-driver:win-v1 |
| 57 | + args: |
| 58 | + - "--v=5" |
| 59 | + - "--endpoint=unix:/csi/csi.sock" |
| 60 | + volumeMounts: |
| 61 | + - name: kubelet-dir |
| 62 | + mountPath: C:\var\lib\kubelet |
| 63 | + - name: plugin-dir |
| 64 | + mountPath: C:\csi |
| 65 | + - name: csi-proxy-pipe |
| 66 | + mountPath: \\.\pipe\csi-proxy-v1alpha1 |
| 67 | + volumes: |
| 68 | + - name: csi-proxy-pipe |
| 69 | + hostPath: |
| 70 | + path: \\.\pipe\csi-proxy-v1alpha1 |
| 71 | + type: "" |
| 72 | + - name: registration-dir |
| 73 | + hostPath: |
| 74 | + path: C:\var\lib\kubelet\plugins_registry\ |
| 75 | + type: Directory |
| 76 | + - name: kubelet-dir |
| 77 | + hostPath: |
| 78 | + path: C:\var\lib\kubelet\ |
| 79 | + type: Directory |
| 80 | + - name: plugin-dir |
| 81 | + hostPath: |
| 82 | + path: C:\var\lib\kubelet\plugins\csi.org.io\ |
| 83 | + type: DirectoryOrCreate |
| 84 | +``` |
4 | 85 |
|
5 | 86 | ## Community, discussion, contribution, and support
|
6 | 87 |
|
|
0 commit comments