feat(storage): add Storage Provider contract (ADR-0001 + design spec) - #26
feat(storage): add Storage Provider contract (ADR-0001 + design spec)#26alex-mabrouk wants to merge 5 commits into
Conversation
Introduce the Storage Provider abstraction that makes OKDP storage-agnostic: consumers depend on a stable, backend-neutral contract (defaultStorage: provider/buckets/grants) and each backend (SeaweedFS, RustFS, MinIO, Ceph RGW, AWS S3) implements it as an adapter, without ever referencing consumer contexts.
Refactor the SeaweedFS package into a compliant adapter of the Storage Provider
contract (docs/design/storage-provider-contract.md): it now consumes ONLY
defaultStorage.{provider,buckets,grants} and no longer reaches into consumer
contexts (.Context.trino / .hiveMetastore / .jupyterHub / .sparkHistory / .polaris).
… local-secrets-provider
|
Looking at the implementation, issue OKDP/sandbox-dependencies#10 and Design model, I think two concerns get conflated: what the current abstraction already standardizes, and what it doesn't standardize yet. The current provider model is consumer-facing only: as a platform contract, OKDP doesn't provision storage and doesn't mandate a particular object storage backend yet. It assumes Storage, IdP, and Database already exist and wires services to them (consumption). SeaweedFS provisioning runs only as a self-contained sandbox/demo convenience, it's not meant to be the good abstraction for storage. So the gap your ADR closes is good: standardize the provisioning side of storage into a backend-neutral contract, the same way consumption already is. A couple of specifics on the field shape:
|
|
Following up on the discussion in OKDP/sandbox-dependencies#10 , here's how i propose to reflect it. Since the PR is still draft and the contract isn't merged anywhere, this is the cheapest moment to reshape it; i'd rather settle the structure now than after adapters ship against it. Notes:
If this matches what you had in mind, I'll push the restructure (ADR + design spec + both adapters) on this branch. WDYT? |
|
A migrer sur l’autre repo (prerequisites/core) |
|
Closing this PR without merging. Two things changed since it was opened:
RustFS is now installable either from the admin console or by adding it to the catalog, so the adapter no longer needs to live here. Rather than rebase this branch onto a scope it no longer matches, I'm closing it and deleting the branch to start from a clean base. Thanks @idirze for the review - the consumption / requirements split you pushed for is what actually landed in the sandbox contracts. |
Description
Make OKDP storage-agnostic by introducing a Storage Provider abstraction (Adapter pattern):
data services (Trino, Hive Metastore, Spark History, JupyterHub, Polaris) depend only on a stable,
backend-neutral contract (
defaultStorage:provider/buckets/grants), and each backend(SeaweedFS, RustFS, MinIO, Ceph RGW, AWS S3) implements it as an adapter that never references a
consumer context.
Today the SeaweedFS package is tightly coupled to every consumer (it reads
.Context.trino,.Context.hiveMetastore,.Context.polaris, …), so a second backend would be a full rewrite. ThisPR replaces that inverted dependency with a clean contract.
**Delivered in three commits **
docs: the contract — ADR-0001 (why) + design spec (how).refactor(seaweedfs): turn the SeaweedFS package into a compliant adapter consuming onlydefaultStorage.{provider,buckets,grants}(behaviour-preserving) + mirror the neutral contractinto the catalog contexts.
feat(rustfs): add RustFS as the second provider (official chart +mc-based provisioning Job).Related Issue
Fixes OKDP/sandbox-dependencies#10
Type of Change
How to Test
Contract review (this commit): read
docs/adr/0001-storage-provider-abstraction.mdanddocs/design/storage-provider-contract.md.End-to-end (once commits 2 & 3 land), validated locally on a Kind cluster:
built from
grants/buckets; Polaris STSAssumeRole+ real S3 write succeed.defaultStorage.provider.endpoints(+ name) and thedeployed infra Release: RustFS auto-provisions the 7 grants (users/policies) and 5 buckets, and
Polaris STS
AssumeRole+ write round-trip succeed — with zero change to any consumer.Checklist