@xemahq/storage-driver-docker-swarm-csi
v0.1.0
Published
Docker Swarm CSI StorageDriver — pool = one cluster-scoped CSI volume; subPath = directory within. WS6 Part B of xema-os-plan §workspace.
Readme
@xemahq/storage-driver-docker-swarm-csi
Docker Swarm CSI cluster-volume storage driver
This package belongs to Layer 1 — runtime. It implements the kernel's
StorageDriver contract and depends only on @xemahq/kernel-contracts plus
npm libs.
Overview
A multi-node Docker Swarm implementation of the workspace storage-driver contract, backed by a CSI plugin. A storage pool maps onto a single cluster-scoped CSI volume — schedulable on any Swarm node — and per-allocation isolation is a subdirectory within it. Because the volume is cluster-scoped, a worker container attaches the same pool regardless of which node it lands on. The consuming service injects a Swarm CSI client, so the package stays free of a hard SDK dependency.
When to use it
- Use it for multi-node Docker Swarm clusters that have a CSI plugin installed and need shared, node-independent workspace volumes (the Swarm equivalent of a Kubernetes ReadWriteMany PVC), where full Kubernetes is not in play.
Installation
pnpm add @xemahq/storage-driver-docker-swarm-csiUsage
import { createDockerSwarmCsiStorageDriver } from '@xemahq/storage-driver-docker-swarm-csi';
const driver = createDockerSwarmCsiStorageDriver({
csi: mySwarmCsiClient,
// Must match the CSI plugin installed on the Swarm cluster.
csiDriver: 'org.democratic-csi.nfs',
});
await driver.ensurePool(poolSpec);License
Apache-2.0 © Xema — xema.dev
