Skip to content

irbekrm/csi-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csi-s3

test

CSI Driver for S3 via FUSE

⚠️ This project is in pre-alpha state. It was built with a goal to learn more about CSI Drivers and is not meant to be used in production. See below for how to try it out ⚠️

Description

A Kubernetes CSI driver for creating Persistent Volumes backed by S3.

Supported mounters

Supported S3 types

  • AWS S3 (at the moment only pre-existing buckets)

Implementation

Kubernetes

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

Mounting S3 to filesystem is possible via FUSE.

csi-s3 invokes higher level tools that do the actual mounting.

Development

Tests

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:

  1. (OSX only) Ensure Docker is installed and running

  2. From the root of repository run make test

If you have made any code changes, you might also want to regenerate the mocks

Build

It is only possible to build for Linux targets.

Run make build, this will produce csi-s3 binary in outputs directory

Mocks

This project uses generated gomock mocks for unit testing. The generated mocks are at /mocks

To regenerate the mocks:

  1. Install mockgen

  2. Run make generate

Deploying on Kubernetes

  1. Deploy csi-s3 driver (as a Daemonset), RBAC resources and a CSIDriver custom resource

kubectl apply -f deployments/

  1. See /examples for how to create a Persistent Volume backed by csi-s3 and use it

Manually testing the API

See /deployments/debug for an example of how to run csi-s3 and manually test the API.

CSI Compatibility

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: