Skip to content

feat(storage): support CDI DataSource fast cloning and decoupled persistent dataDisks - #10

Merged
celttechie merged 1 commit into
mainfrom
feat/v0.5.0-datasource-persistent-storage
Nov 14, 2026
Merged

celttechie merged 1 commit into
mainfrom
feat/v0.5.0-datasource-persistent-storage

Conversation

@celttechie

@celttechie celttechie commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Summary of Changes

  • Extended UDSVirtualMachine API types (pkg/apis/uds/v1alpha1/types.go) and CRD (manifests/crd/udsvirtualmachines.uds.dev.yaml) with sourceType: dataSource (dataSourceName, dataSourceNamespace) and spec.dataDisks[].
  • Updated BuildDataVolume, BuildVirtualMachine, BuildDataDiskPVC, and EvaluateStatusFromDataVolume in pkg/controller/reconciler.go to support CDI sourceRef CoW cloning and retentionPolicy: Retain | Delete (omitting OwnerReferences on retained PVCs).
  • Extended uds-vmctl prep (cmd/uds-vmctl/main.go, pkg/cli/prep.go) with --golden-image, --data-source-name, and --data-source-ns flags.
  • Expanded unit test suite to 33 passing tests with -race.

Problem & Motivation

Implements Milestone v0.5.0 Phase 5A to enable sub-minute VM provisioning from central verified CDI DataSource golden images and preserve stateful application data across OS replacements.

NIST 800-53 Compliance Checklist

  • SC-7 (Boundary Protection): Zero-Trust NetworkPolicy isolation maintained on cloned VMs.
  • AC-3 / IA-5 (Access Control & Identification): Cloud-Init hardening, SSH password restrictions, and FIPS enforcement verified.
  • SI-7 (Software & Information Integrity): Central DataSource ingestion enforces CDI PR #4340 SHA-256 digest verification before cloning.
  • SA-11 (Developer Security Testing): Automated Go (go test -race) test suite passes without regressions (33/33 tests).
  • CM-6 (Configuration Settings): CRD and declarative manifests pass validation schema.

Air-Gap & Edge Readiness

  • No unflattened QCOW2 external backing chains introduced.
  • All required artifacts/dependencies can be bundled in disconnected Zarf packages.
  • +6% CDI filesystem overhead calculation validated for storage sizing.

Testing & Verification

Automated Tests

go test -v -race ./...

Live Cluster Verification

  • Tested on live K3s / KubeVirt cluster (kubevirt-sandbox) with cross-namespace CDI DataSource CoW clone (uds-golden-images -> default)
  • Verified retentionPolicy: Retain PVC survives UDSVirtualMachine deletion

Documentation

  • CRD manifests updated and synchronized with Go types.

…istent dataDisks

- Add sourceType: dataSource and spec.dataDisks[] to UDSVirtualMachine CRD schema
- Implement CDI sourceRef construction in BuildDataVolume for fast storage-layer CoW cloning
- Implement secondary data disk attachment and BuildDataDiskPVC with retentionPolicy (Retain/Delete)
- Extend uds-vmctl prep to generate central CDI DataSource/DataVolume and consumer VM manifests
- Expand unit test suite to 33 passing tests with race detection across controller, CLI, and APIs
@celttechie
celttechie merged commit f42b2b4 into main Nov 14, 2026
3 checks passed
@celttechie
celttechie deleted the feat/v0.5.0-datasource-persistent-storage branch November 14, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant