Skip to content

Commit 31a17d9

Browse files
authored
Add asciiflow diagram to the csi-proxy
borrowed from @ddebroy 's slack message, added some metadata. Also added example files to look at to make it easier to grok the way its used by looking at SMB/Azure File implementations
1 parent 4ccd657 commit 31a17d9

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

README.md

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
11
# CSI Proxy
22

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.
3+
CSI Proxy (which might be more aptly named "csi-node-proxy") is a binary that exposes a set of gRPC APIs around local storage operations for nodes in Windows. A container, such as CSI node plugins, can mount the named pipes depending on operations it wants to exercise on the host and
4+
invoke the APIs. This allows a storage plugin to run as if were a CSI plugin on linux which had the ability to do "priveleged" actions on the windows host OS.
5+
6+
```
7+
+------------------+
8+
+---------------------------------------------| |
9+
| +----------+ | |
10+
| |csi node | | CSI Node Plugin|
11+
| |driver +----------------> |
12+
| |registrar | | |
13+
| NodeStageVolume ----^------+ ----------+--------+
14+
| NodeUnstageVol | | Disk APIs
15+
| NodePublishVol |GetNodeInfo | Volume APIs
16+
| NodeResizeVol |NodeRegistrationStatus /pipe | SMB APIs
17+
| NodeGetInfo | | FileSystem/System APIs
18+
| NodeGetVolStats | csi-plugin-reg.sock +---------v---------+
19+
| | | |
20+
| + --+--------+ | csi-proxy.exe |
21+
| | kubelet.exe| +-------------------+
22+
| | | |
23+
| +---+--------++ |
24+
| | |
25+
| csi.sock | |
26+
| v v
27+
| +---+-------------------------------+------+
28+
| | |
29+
+---------------->| Host Os (Windows) |
30+
+------------------------------------------++
31+
```
32+
In the above diagram, there are 3 communication channels being utilized for CSI proxy:
33+
34+
- `csi.sock` : This lives at /var/lib/kubelet/plugins/csi-plugin/csi.sock, and is used for the host OS to communicate with the CSI node plugin
35+
- `csi-plugin-reg.sock` : This lives here, /var/lib/kubelet/plugins_registry/csi-plugin-reg.sock, and is used for the kubelet itself to get metadata as needed from the csi plugin
36+
- `/pipe` : /pipe/csi-proxy-api-group-v-... : This pipe lives at \pipe\csi-proxy-api-group-v-..., upon receipt of specific requests from the Node plugin, it carries out actions on the node plugins behalf. Since it doesn't execute arbitrary commands on the host, its more secure then simply being a black-box proxy to run host commands.
737

838
Each named pipe will support a specific version of an API (e.g. v1alpha1, v2beta1)
939
that targets a specific area of storage (e.g. disk, volume, file, SMB, iSCSI).
@@ -143,11 +173,11 @@ You can reach the maintainers of this project at:
143173

144174
## Supported CSI Drivers
145175

146-
- [SMB CSI Driver](https://github.com/kubernetes-csi/csi-driver-smb/tree/master/deploy/example/windows)
176+
- [SMB CSI Driver](https://github.com/kubernetes-csi/csi-driver-smb/tree/master/deploy/example/windows). To see specifically how this driver is invoked, you can look at https://github.com/kubernetes-csi/csi-driver-smb/blob/master/pkg/mounter/safe_mounter_windows.go.
147177

148178
- [Azure Disk CSI Driver](https://github.com/kubernetes-sigs/azuredisk-csi-driver/tree/master/deploy/example/windows)
149179

150-
- [Azure File CSI Driver](https://github.com/kubernetes-sigs/azurefile-csi-driver/tree/master/deploy/example/windows)
180+
- [Azure File CSI Driver](https://github.com/kubernetes-sigs/azurefile-csi-driver/tree/master/deploy/example/windows). See https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/pkg/mounter/safe_mounter_windows.go as an example of the invocation path
151181

152182
- [Google Compute Engine Persistent Disk CSI Driver](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver)
153183

0 commit comments

Comments
 (0)