Skip to content

Storage Layer Abstraction#686

Draft
noctarius wants to merge 30 commits intomainfrom
storage-abstraction
Draft

Storage Layer Abstraction#686
noctarius wants to merge 30 commits intomainfrom
storage-abstraction

Conversation

@noctarius
Copy link
Collaborator

This pull request introduces a storage layer abstraction which removes the hard dependency on simplyblock and enables alternative underlying storage engines, such as LVM.

What Changed

1. Moved simplyblock-specific logic behind backend modules

  • Moved StorageClass manifest build logic out of generic deployment flow into simplyblock backend module.
  • Moved simplyblock credential loading and volume identifier resolution to simplyblock boundary code.
  • Refactored branch DB volume size resolution and IOPS updates to call backend abstractions (lookup_volume, update_performance) instead of direct simplyblock API calls.

2. Backend-driven clone/restore orchestration

  • Branch clone/restore flows in branch API now call backend operations rather than assembling snapshot/storage class details directly.
  • Added backend operations for clone/restore execution and snapshot usage retrieval.

3. Snapshot/storage class de-hardcoding

  • Removed hardcoded branch snapshot class path.
  • backup.py and backupmonitor.py now resolve snapshot class via active backend.
  • Chart defaults no longer hardcode simplyblock-csi-sc (storageClassName defaults set to empty and populated by controller).

4. Capability-aware IOPS behavior

  • DeploymentParameters.iops is now optional.
  • Clone validation requires IOPS only when backend supports volume IOPS controls.
  • Resize IOPS updates are capability/policy gated:
    • supported backend: apply runtime update
    • unsupported + strict: fail
    • unsupported + best_effort: no-op runtime update, persist logical allocation
  • Branch persistence remains compatible via fallback/default (IOPS_MIN) where needed.

5. Resource/metering updates

  • Resource usage collection routes through backend usage providers (no direct simplyblock calls in resources API).
  • Snapshot used-size calculation is backend-provided.
  • volume_metrics_available now initializes from backend metric capabilities and flips false on runtime collection failure (not hardcoded true).

6. Config and API surfacing

  • Added missing deployment settings:
    • storage_default_class
    • storage_snapshot_class
  • /system/resource-limit-definitions is backend-aware: iops definition is only returned when backend supports volume IOPS.

@noctarius noctarius self-assigned this Mar 20, 2026
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