delonix sharevolume
Uma fatia ISOLADA e com QUOTA própria de um `Storage` — vários container/vm/pod partilham um NAS.
An ISOLATED, individually-QUOTA'd slice of a `Storage` — several container/vm/pod share one NAS.
Resolve um problema concreto de multi-tenant: várias cargas a partilhar UM export
NFS/CIFS/WebDAV, cada uma com o SEU ponto de montagem isolado e a SUA quota, sem se verem. Por baixo
não há mecanismo de montagem novo nenhum: cada ShareVolume é um SUBDIRECTÓRIO real da
árvore já montada pelo kind: Storage pai (<storage>/_data/shares/<nome>),
registado como o seu próprio volume — a isolação é confinamento de caminho puro e o consumo usa o
-v <nome>:/destino de sempre, sem código novo nenhum do lado do container/vm/pod. A
quota é SOFT (uso medido + alerta) — o caminho HARD (imagem ext4 loopback) precisa de armazenamento de
bloco local e não compõe com um subdirectório de um mount de rede.
Solves a concrete multi-tenant problem: several workloads sharing ONE
NFS/CIFS/WebDAV export, each with ITS OWN isolated mount point and ITS OWN quota, without seeing
each other. Under the hood there's no new mount mechanism at all: each ShareVolume is
a real SUBDIRECTORY of the tree already mounted by the parent kind: Storage
(<storage>/_data/shares/<name>), registered as its own volume — the
isolation is pure path confinement, and consumption uses the usual
-v <name>:/dest, no new code at all on the container/vm/pod side. The quota is
SOFT (measured usage + alert) — the HARD path (a loopback ext4 image) needs local block storage
and doesn't compose with a subdirectory of a network mount.
📄 Implementação real em Rust: cmd/sharevolume.rs
Usage: dlx sharevolume [OPTIONS] <COMMAND>
Commands:
apply Apply the `kind: ShareVolume` documents of a manifest (idempotent)
ls List share volumes (parent storage, quota, live usage)
describe Human-readable detail of one share volume
rm Un-register a share volume. The underlying data (a subdirectory of the parent Storage) is PRESERVED unless `--purge-data` is passed
help Print this message or the help of the given subcommand(s)
Options:
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
-h, --help Print helpsharevolume apply
Apply the kind: ShareVolume documents of a manifest (idempotent)
Usage: dlx sharevolume apply [OPTIONS]
Options:
-f, --file <FILE>
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
-h, --help Print helpExemplos
delonix sharevolume apply -f sharevolume.yamlsharevolume/tenant-a: ready (nas-shared -> /var/lib/delonix/volumes/nas-shared/_data/shares/tenant-a)
sharevolume/tenant-b: ready (nas-shared -> /var/lib/delonix/volumes/nas-shared/_data/shares/tenant-b)sharevolume ls
List share volumes (parent storage, quota, live usage)
Usage: dlx sharevolume ls [OPTIONS]
Options:
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
-o, --output <OUTPUT> Output format: `table` (default) or `json` (ADR-0005) [default: table] [possible values: table, json]
-h, --help Print helpExemplos
delonix sharevolume lsNAME STORAGE QUOTA USED ALERT MOUNTPOINT
tenant-b nas-shared 2.0 MiB 0 B - .../shares/tenant-b
tenant-a nas-shared 1.0 MiB 1.0 MiB OVER .../shares/tenant-asharevolume describe
Human-readable detail of one share volume
Usage: dlx sharevolume describe [OPTIONS] <NAME>
Arguments:
<NAME>
Options:
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
-h, --help Print helpExemplos
delonix sharevolume describe tenant-aName: tenant-a
Storage: nas-shared
Mountpoint: .../shares/tenant-a
Used: 1.0 MiB
Quota: 1.0 MiB
Alert: OVER QUOTA
Consume with: -v tenant-a:/path/in/containersharevolume rm
Un-register a share volume. The underlying data (a subdirectory of the parent Storage) is PRESERVED unless --purge-data is passed
Usage: dlx sharevolume rm [OPTIONS] <NAME>
Arguments:
<NAME>
Options:
--l18n <en|pt> Output language: `en` (default) or `pt` (Portuguese, pt_AO). Also settable via `$DELONIX_L18N`. Global — works before any subcommand
--purge-data
-h, --help Print helpExemplos
delonix sharevolume rm tenant-aLaboratórioLab
Duas fatias isoladas do MESMO Storage, cada uma com a
sua quota, para dois containers que não se devem ver.
delonix sharevolume apply -f sharevolume-a.yaml
delonix sharevolume apply -f sharevolume-b.yaml
delonix sharevolume lsTwo isolated slices of the SAME Storage, each with its
own quota, for two containers that shouldn't see each other.
delonix sharevolume apply -f sharevolume-a.yaml
delonix sharevolume apply -f sharevolume-b.yaml
delonix sharevolume lsDesafioChallenge
Monta o ShareVolume A num container e o B noutro. Confirma que listar o ponto de montagem de um NUNCA mostra ficheiros do outro — a isolação é só confinamento de caminho, sem mecanismo de montagem novo.
Mount ShareVolume A into one container and B into another. Confirm that listing one's mount point never shows the other's files — the isolation is pure path confinement, no new mount mechanism involved.