Package the Kubernetes alpha into a script-based Day-1 activation loop: activate the stack, create the first PVC-backed volume, verify writer/reader data, collect product-owned observation evidence, render a local read-only report, and clean up. Includes multi-node-safe activation defaults, first-volume example automation, read-only ops report output, README/quickstart/release note updates, and review-driven hardening for fail-fast configuration, promotion evidence, inventory fail-closed behavior, and test guards. Validated by Day-1 activation run 20260517-205252-04e9 and read-only report run 20260517-212358-bfba. Local targeted tests passed.
4.4 KiB
Phase 20 D2/D3 Ref: First Volume User Loop (Before Helm)
Status: proposed reference for next implementation slice.
Why This Slice
Phase 20 D1 is now green for activation. The next product gap is not Helm yet; it is the first user volume loop after install:
install
-> create PVC
-> wait ready
-> writer/reader verify
-> status evidence
-> cleanup
If this loop is not stable and self-explaining, Helm only moves the failure surface and hides root causes behind packaging.
Product Question
Can a Kubernetes user, using published immutable images, complete one first volume loop and produce a compact evidence summary without internal help?
Scope
This D2/D3 slice should ship:
- A runner-native first-volume scenario on published immutable images.
examples/kubernetes/basic-app/as canonical user volume flow.- Explicit status evidence capture after PVC creation:
kubectl get pvckubectl get deploy -A -l app=sw-blockvolumesw-block ops cluster -o jsonsw-block ops inventory --out ...
- A compact
first-volume-summary.txtin artifacts with:pvc=<name>volume_id=<id>writer_verified=true|falsereader_verified=true|falsecluster_evidence=status/cluster-evidence.jsoninventory_bundle=status/inventorycleanup_status=ok|failed
- QA run on immutable GHCR tags.
- Multi-node activation must avoid loopback publish targets by default: activation auto-selects a Ready node InternalIP, enables external iSCSI/status with CHAP, and renders node-stage secret references into the StorageClass used by the first-volume example.
Out Of Scope
- Helm chart packaging.
- New HA semantics.
- Mutating admin workflows.
- Backup/snapshot/restore.
- Performance/SLO claims.
Canonical Commands
Install (published immutable):
SW_BLOCK_ACTIVATION_IMAGE_MODE=published \
SW_BLOCK_IMAGE=ghcr.io/seaweedfs/seaweed-block:sha-<commit> \
SW_BLOCK_CSI_IMAGE=ghcr.io/seaweedfs/seaweed-block-csi:sha-<commit> \
bash scripts/activate-k8s-alpha.sh "$PWD"
Create first volume:
kubectl apply -f examples/kubernetes/basic-app/storageclass-pvc.yaml
kubectl apply -f examples/kubernetes/basic-app/writer-pod.yaml
kubectl apply -f examples/kubernetes/basic-app/reader-pod.yaml
Status evidence:
kubectl get pvc
kubectl get deploy -A -l app=sw-blockvolume
sw-block ops cluster --master-api 127.0.0.1:9333 -o json
sw-block ops inventory --namespace default --master 127.0.0.1:9333 --out /tmp/sw-block-inventory
The helper script prefers $SW_BLOCK_CLI or an installed sw-block binary and
falls back to go run ./cmd/sw-block only for source-tree dev use.
It cleans the example pod/PVC/StorageClass resources by default; set
SW_BLOCK_BASIC_APP_CLEANUP=0 only when intentionally preserving them for
manual inspection.
Cleanup:
kubectl delete pod sw-block-example-reader --ignore-not-found=true
kubectl delete pod sw-block-example-writer --ignore-not-found=true
kubectl delete pvc sw-block-example-pvc --ignore-not-found=true
kubectl delete storageclass sw-block-example --ignore-not-found=true
bash scripts/uninstall-k8s-alpha.sh "$PWD"
Evidence Contract
Required artifact shape:
activation/
activation-summary.txt
first-volume/
writer.log
reader.log
kubectl-get-pvc.txt
kubectl-get-blockvolume-deploy.txt
cluster-evidence.json
inventory/
first-volume-summary.txt
cleanup/
uninstall.log
delete-storageclass.log
first-volume-summary.txt is the PM-facing verdict file for this slice. If
status evidence cannot be collected, it must say first_volume_status=failed
and failed_phase=status_evidence instead of silently passing.
QA Matrix
Minimum matrix for this slice:
published + immutable sha(required close path).published + :alpha(non-blocking drift smoke).localmode remains dev regression path, not PM release attestation.
Close Gate
D2/D3 closes when all are true:
- Immutable published path passes end-to-end.
- Writer and reader checksum both pass.
- Status evidence files exist and are readable.
first-volume-summary.txtexists and is self-contained.- Cleanup leaves no active iSCSI sessions and no product residue.
Suggested Claim After Close
Seaweed Block supports a documented first-volume Kubernetes loop on published immutable images: install, create PVC-backed volume, verify app write/read, capture status evidence, and clean teardown with supportable artifacts.