Skip to content

Add asciiflow diagram to the csi-proxy #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 37 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
# CSI Proxy

CSI Proxy is a binary that exposes a set of gRPC APIs around storage operations
over named pipes 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
invoke the APIs.
CSI Proxy (which might be more aptly named "csi-node-proxy") is a binary that exposes a set of gRPC APIs (over named pipes) 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
invoke the APIs. This allows a storage plugin to run as if were a CSI plugin on linux which have the ability to perform "privileged" actions on the windows host OS.

```
+------------------+
+---------------------------------------------| |
| +----------+ | |
| |csi node | | CSI Node Plugin|
| |driver +----------------> |
| |registrar | | |
| NodeStageVolume ----^------+ ----------+--------+
| NodeUnstageVol | | Disk APIs
| NodePublishVol |GetNodeInfo | Volume APIs
| NodeResizeVol |NodeRegistrationStatus \\.\pipe\ | SMB APIs
| NodeGetInfo | | File System operations
| | | Windows System APIs
| NodeGetVolStats | csi-plugin-reg.sock +-----------v---------+
| | | |
| + --+--------+ | csi-proxy.exe |
| | kubelet.exe| +-------------------+
| | | |
| +---+--------++ |
| | |
| csi.sock | |
| v v
| +---+-------------------------------+------+
| | |
+---------------->| Host Os (Windows) |
+------------------------------------------++
```
In the above diagram, there are 3 communication channels being utilized for CSI proxy:

- `csi.sock` : This usually lives at c:/var/lib/kubelet/plugins/csi-plugin/csi.sock, and is used for the host OS to communicate with the CSI node plugin
- `csi-plugin-reg.sock` : This lives here, c:/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 .
- `\\.\pipe\csi-proxy` : This will live in a pipe, i.e. 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\.\pipe/csi-proxy-api-group-v- --> \.\pipe\csi-proxy-api-group-v- ?


Each named pipe will support a specific version of an API (e.g. v1alpha1, v2beta1)
that targets a specific area of storage (e.g. disk, volume, file, SMB, iSCSI).
Expand All @@ -13,7 +44,6 @@ that targets a specific area of storage (e.g. disk, volume, file, SMB, iSCSI).
CSI drivers are recommended to be deployed as containers. Node plugin containers need to run with privileges to perform storage related operations. However, Windows does not support privileged containers currently. With CSIProxy, the node plugins can now be deployed as unprivileged pods that use the proxy to perform privileged storage operations on the node. Kubernetes administrators will need to install and maintain csi-proxy.exe on all Windows nodes in a manner similar to kubelet.exe.

## Compatibility

Recommended K8s Version: 1.18

## Feature status
Expand Down Expand Up @@ -143,11 +173,11 @@ You can reach the maintainers of this project at:

## Supported CSI Drivers

- [SMB CSI Driver](https://github.com/kubernetes-csi/csi-driver-smb/tree/master/deploy/example/windows)
- [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.

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

- [Azure File CSI Driver](https://github.com/kubernetes-sigs/azurefile-csi-driver/tree/master/deploy/example/windows)
- [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

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

Expand Down