https://github.com/serverscom/serverscom-rbs-csi
https://github.com/serverscom/serverscom-rbs-csi
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/serverscom/serverscom-rbs-csi
- Owner: serverscom
- License: apache-2.0
- Created: 2025-10-27T09:55:23.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-12-31T10:13:40.000Z (6 months ago)
- Last Synced: 2026-01-04T16:07:16.226Z (6 months ago)
- Language: Go
- Size: 63.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RBS CSI Driver
Kubernetes CSI driver for Remote Block Storage (RBS) - dynamic provisioning and management of iSCSI block volumes.
## Features
- Dynamic volume provisioning via RBS API
- iSCSI block device attachment
- Online volume expansion
- Multiple filesystems: ext4, ext3, xfs, btrfs
- CHAP authentication
- **PVC naming** - volumes named by PVC instead of UUID
- **Label propagation** - StorageClass → PVC → RBS volume labels
- **Idempotent operations** - safe retries via label lookup
## Quick Start
```bash
# 1. Create credentials secret
kubectl create secret generic rbs-csi-secret \
--from-literal=api-url="https://api.servers.com/v1" \
--from-literal=api-token="your-api-token" \
--namespace=kube-system
# 2. Deploy latest driver version
kubectl apply -f https://github.com/serverscom/serverscom-rbs-csi/releases/latest/download/rbs-csi-deploy.yaml
# or specific version
kubectl apply -f https://github.com/serverscom/serverscom-rbs-csi/releases/download/v0.1.0/rbs-csi-deploy.yaml
# 3. Create StorageClass
kubectl apply -f examples/storageclass.yaml
# 4. Create PVC
kubectl apply -f examples/pvc.yaml
```
## Configuration
### StorageClass Parameters
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rbs-ssd
labels:
environment: production
provisioner: rbs.csi.servers.com
parameters:
rbs.csi.servers.com/location: "40"
rbs.csi.servers.com/flavor: "16997"
# names for location and flavor also supported
# rbs.csi.servers.com/flavor: "SSD-High"
# rbs.csi.servers.com/location: "AMS1"
rbs.csi.servers.com/labels: |
{
"managed-by": "kubernetes"
}
allowVolumeExpansion: true
volumeBindingMode: WaitForFirstConsumer
```
## Label Propagation
Labels merge with priority: **System > PVC > StorageClass**
Example:
```yaml
# StorageClass labels
parameters:
rbs.csi.servers.com/labels: |
{
"managed-by": "kubernetes"
}
---
# PVC labels
metadata:
labels:
app: database
environment: staging # Overrides StorageClass
# Result on RBS volume:
# {
# "pvc-uuid": "abc-123",
# "pvc-namespace": "default",
# "app": "database",
# "environment": "staging",
# "managed-by": "kubernetes"
# }
```
## Architecture
**CSI Controller** (Deployment):
- CreateVolume, DeleteVolume, ExpandVolume
- RBS API integration
**CSI Node** (DaemonSet):
- StageVolume, UnstageVolume
- iSCSI discovery and login
- Filesystem formatting and mounting
## Examples
### Basic PVC
```yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-data
labels:
app: nginx
spec:
accessModes:
- ReadWriteOnce
storageClassName: rbs-ssd
resources:
requests:
storage: 10Gi
```
### Volume Expansion
```yaml
spec:
resources:
requests:
storage: 20Gi # Increased from 10Gi
```
## License
Apache 2.0