Skip to content

Commit 15545a0

Browse files
committed
docs: checkpoint — Phase 1 done, Phase 2 next (CRD store via kubebuilder create api)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent 6174675 commit 15545a0

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

PLAN.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,24 @@ high-bandwidth check-ins with the user.
1515

1616
## Current status
1717

18-
- **Phase**: 1 mostly done; preparing Phase 2 (CRDs + reconcile)
19-
- **Last action**: kubebuilder-scaffolded controller binary + `pkg/rest` Runnable serving `/v1/controller/version` and `/v1/healthz`, golinstor compatibility verified end-to-end, full-branch tests committed (8 cases). golangci-lint config + auto-lint hook (`golangci-lint@claude-code-companions`) in place. CSI MVP API surface enumerated in `docs/csi-api-surface.md` (1/many endpoints implemented).
18+
- **Phase**: 1 done; Phase 2 (CRDs + reconcile) starting
19+
- **Implemented**:
20+
- `/v1/controller/version` — pinned to wire shape; golinstor `GetVersion` round-trip green
21+
- `/v1/healthz` — 204 probe
22+
- `/v1/nodes` — GET list, GET, POST, PUT, DELETE (full CRUD); golinstor `Nodes.{GetAll,Get,Create,Delete}` green
23+
- `/v1/view/storage-pools` — read aggregate
24+
- `/v1/nodes/{node}/storage-pools[/{pool}]` — read list and read get
25+
- InMemory store (sync.RWMutex) for both Node and StoragePool, behind a `Store` interface seam Phase 2 will swap for CRDs
26+
- 30+ unit+contract tests, all green; `golangci-lint run ./...` zero issues
27+
- `linstor-common` as submodule (properties.json, consts.json, drbdoptions.json)
28+
- `apiconsts` reused from `github.com/LINBIT/golinstor` (`linstor.MaskError` etc.) — no separate fork
2029
- **Blocker**: none
21-
- **Next concrete steps**:
22-
1. Wire `linstor-common` as git submodule (properties.json, consts.json, drbdoptions.json, generated apiconsts).
23-
2. Wire `oapi-codegen` to regenerate `pkg/api/v1` from upstream `rest_v1_openapi.yaml` so we don't keep adding types by hand.
24-
3. Port `apiconsts.go` from golinstor for ApiCallRc codes (needed for proper error responses).
25-
4. Phase 2 begin: `kubebuilder create api --group blockstor.io --version v1 --kind Node`; CRD types + reconciler stubs for `Node`, `StoragePool`, `ResourceDefinition`, `Resource`, `VolumeDefinition`, `Volume`, `Snapshot`, `ResourceGroup`.
26-
5. Implement `/v1/nodes` reading from CRD store; tests against golinstor `Nodes.GetAll/Get/Create/Modify/Delete`.
30+
- **Next concrete steps** (Phase 2):
31+
1. `kubebuilder create api --group blockstor.io --version v1 --kind Node` and same for `StoragePool`. Generate DeepCopy + CRD manifests.
32+
2. Add `pkg/store/k8s` — implementation of `store.Store` backed by `controller-runtime` client. Same interface as InMemory; identical test suite (table-driven so we can reuse) must pass against an envtest.
33+
3. Wire a flag in `cmd/main.go` to choose between InMemory and k8s store (default k8s; InMemory is for tests).
34+
4. Reconciler stubs for Node and StoragePool (no-op for now; just make sure manager + scheme + leader-election work).
35+
5. Continue per `docs/csi-api-surface.md`: `/v1/resource-groups` (linstor-csi creates one per StorageClass), then `/v1/resource-definitions`, then `/v1/view/resources`.
2736

2837
---
2938

0 commit comments

Comments
 (0)