CSI Driver for S3 via FUSE
A Kubernetes CSI driver for creating Persistent Volumes backed by S3.
- AWS S3 (at the moment only pre-existing buckets)
csi-s3
is implemented according to the CSI spec.
It exposes a gRPC API over a Unix Domain Socket. The RPCs in this API are called by the kubelet as well as the various CSI sidecar containers.
csi-s3
has to be deployed as a Daemonset (it needs to be running on the node to be able to mount the volume)
Mounting S3 to filesystem is possible via FUSE.
csi-s3
invokes higher level tools that do the actual mounting.
This project can only be built for Linux targets because of a dependency on a Linux-specific filesystem package.
To run the unit tests (using Docker) on any OS:
-
(OSX only) Ensure Docker is installed and running
-
From the root of repository run
make test
If you have made any code changes, you might also want to regenerate the mocks
It is only possible to build for Linux targets.
Run make build
, this will produce csi-s3
binary in outputs
directory
This project uses generated gomock mocks for unit testing. The generated mocks are at /mocks
To regenerate the mocks:
-
Run
make generate
- Deploy
csi-s3
driver (as a Daemonset), RBAC resources and aCSIDriver
custom resource
kubectl apply -f deployments/
- See /examples for how to create a Persistent Volume backed by
csi-s3
and use it
See /deployments/debug for an example of how to run csi-s3
and manually test the API.
The gRPC API of csi-s3
implements a subset of the functionality described by the CSI spec
Currently implemented RPCs from the CSI spec are:
-
Node Service
- NodePublishVolume RPC - mounts an already existing bucket
- NodeUnpublishVolume RPC - unmounts a bucket
- NodeGetInfo RPC - node id (from plugin's perspective)
- NodeGetCapabilities RPC- optional node capabilities that the driver implements
-
Identity Service
- Probe RPC - verifies that the driver is healthy
- GetPluginInfo RPC - returns name and version of the driver
- GetPluginCapabilities RPC - additional capabilities/constraints of the driver