Caution
You are currently on a branch which corresponds to the v0.3
release of the Scaleway CSI.
This release is NOT compatible with the v0.2
and v0.1
releases as it introduces
a major breaking change: it now uses the new Scaleway Block Storage (SBS) API instead of the Instance API to manage block volumes and
snapshots.
If you are currently using the v0.2.x
or v0.1.x
versions of the Scaleway CSI:
please make sure you migrate your volumes using the sbs-migration
tool. Your volumes will automatically be migrated if you use the Helm Chart.
The Scaleway Block Volume Container Storage Interface (CSI) driver is an implementation of the CSI interface to provide a way to manage Scaleway Block Volumes through a container orchestration system, like Kubernetes.
Scaleway CSI Driver \ CSI Version | v1.2.0 | v1.6.0 | v1.8.0 |
---|---|---|---|
master branch | ✅ | ✅ | ✅ |
v0.1.x | ✅ | ❌ | ❌ |
v0.2.x | ✅ | ✅ | ❌ |
v0.3.x | ✅ | ✅ | ✅ |
Scaleway currently offers two APIs to manage Block Volumes and Snapshots:
A Block Volume or Snapshot currently managed by the Instance API cannot be managed by the Scaleway Block Storage API and vice versa.
In the future, all Block Volumes and Snapshots will be managed by the Scaleway Block Storage API.
In order to use newer versions of the CSI (v0.3 ), it is needed to migrate Block Volumes and Snapshots from the Instance API to the Scaleway Block Storage API using the sbs-migration tool. Your volumes will automatically be migrated if you use the Helm Chart.
Scaleway CSI Driver \ Scaleway Storage API compatibility | Instance API | Scaleway Block Storage API |
---|---|---|
master branch | ❌ | ✅ |
v0.1.x | ✅ | ❌ |
v0.2.x | ✅ | ❌ |
v0.3.x | ❌ | ✅ |
Here is a list of features implemented by the Scaleway CSI driver.
The Scaleway CSI driver implements the resize feature (example for Kubernetes). It allows an online resize (without the need to detach the block device). However resizing can only be done upwards, decreasing a volume's size is not supported.
Raw Block Volumes
allows the block volume to be exposed directly to the container as a block device,
instead of a mounted filesystem. To enable it, the volumeMode
needs to be set to Block
.
For instance, here is a PVC in raw block volume mode:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-raw-pvc
spec:
volumeMode: Block
[...]
Support for volume encryption with Cryptsetup/LUKS. See more details in examples
Volume Snapshots allows the user to create a snapshot of a specific block volume.
The Scaleway CSI driver implements the NodeGetVolumeStats
CSI method. It is used to gather statistics about the used block volumes. In Kubernetes,
kubelet
exposes these metrics.
The Scaleway CSI driver is built upon the Block Storage Low Latency Scaleway product.
It currently provides volumes with up to 15,000 IOPS. By default, created volumes
have 5000 IOPS. To create volumes with higher IOPS, you can set the iops
parameter
to the requested number of IOPS in your StorageClass
. For example:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: my-15k-iops-storage-class
provisioner: csi.scaleway.com
reclaimPolicy: Delete
parameters:
iops: "15000"
This section is Kubernetes specific. Note that Scaleway CSI driver may work for older Kubernetes versions than those announced. The CSI driver allows to use Persistent Volumes in Kubernetes.
Scaleway CSI Driver \ Kubernetes Version | Min K8s Version | Max K8s Version |
---|---|---|
master branch | v1.20 | - |
v0.1.x | v1.17 | - |
v0.2.x | v1.20 | - |
v0.3.x | v1.20 | - |
Some examples are available here.
These steps will cover how to install the Scaleway CSI driver in your Kubernetes cluster, using Helm.
- A Kubernetes cluster running on Scaleway instances (v1.20 )
- Scaleway Project or Organization ID, Access and Secret key
- Helm v3
-
Add the Scaleway Helm repository.
helm repo add scaleway https://helm.scw.cloud/ helm repo update
-
Deploy the latest release of the
scaleway-csi
Helm chart.helm upgrade --install scaleway-csi --namespace kube-system scaleway/scaleway-csi \ --set controller.scaleway.env.SCW_DEFAULT_ZONE=fr-par-1 \ --set controller.scaleway.env.SCW_DEFAULT_PROJECT_ID=11111111-1111-1111-1111-111111111111 \ --set controller.scaleway.env.SCW_ACCESS_KEY=ABCDEFGHIJKLMNOPQRST \ --set controller.scaleway.env.SCW_SECRET_KEY=11111111-1111-1111-1111-111111111111
Review the configuration values for the Helm chart.
-
You can now verify that the driver is running:
$ kubectl get pods -n kube-system [...] scaleway-csi-controller-76897b577d-b4dgw 8/8 Running 0 3m scaleway-csi-node-hvkfw 3/3 Running 0 3m scaleway-csi-node-jmrz2 3/3 Running 0 3m [...]
You should see the scaleway-csi-controller and the scaleway-csi-node pods.
You can build the Scaleway CSI driver executable using the following commands:
make build
You can build a local docker image named scaleway-csi for your current architecture using the following command:
make docker-build
In order to run the tests:
make test
In addition to unit tests, we provide tools to run the following tests:
If you are looking for a way to contribute please read the contributing guide
Participation in the Kubernetes community is governed by the CNCF Code of Conduct.
We love feedback. Feel free to reach us on Scaleway Slack community, we are waiting for you on #k8s.
You can also join the official Kubernetes slack on #scaleway-k8s channel
You can also raise an issue if you think you've found a bug.