Commit 49d210f
refactor: drop the KV-store machinery entirely (Phase 10.4 closure)
Investigation of the production cozystack cluster + a grep of
piraeusdatastore/linstor-csi confirms that linstor-csi has never
written to a generic LINSTOR KV instance. Per-PVC CSI metadata
lives on the RD as `Aux/csi-volume-annotations` /
`Aux/csi-provisioning-completed-by` aux properties — not in any
KV store. The only KV consumer in linstor-csi is
`csi-backup-mapping`, used solely for the L2L (linstor-to-
linstor) backup-remote feature. Clusters without explicit
`linstor remote create linstor ...` invocations show an empty
`linstor c kv list` output. `csi-snapshot-shippings` and
`csi-volumes` KV instances are both fiction.
Deleted:
- api/v1alpha1/kventry_types.go + CRD/RBAC/sample manifests
- pkg/store/k8s/kv_store.go
- pkg/store/inmemory_volume_definition.go's inMemoryKVStore
- store.KeyValueStore interface + Store.KeyValueStore()
accessor (`pkg/store/store.go`)
- storetest.RunKeyValueStore + every caller in both backends
- effectiveprops.LegacyControllerProps + LegacyControllerPropsInstance
const + the matching tests
- pkg/rest/kv_store_test.go (mass test of CSI-volumes routing
through KV — that routing was never load-bearing)
- The csi-volumes annotation special-case routing in
pkg/rest/kv_store.go (read/write per-RD annotations from
POST/PUT) — linstor-csi doesn't actually write there.
- The legacy KV fallback for the cluster passphrase in
pkg/rest/encryption.go (production path went Secret-only in
Phase 10.4; the fallback was scaffolding).
- The Java→KVEntry-shaped controllerPropsInstance / passphraseKey
consts (no longer reachable).
Refactored:
- pkg/rest/kv_store.go is now a minimal stub: GET → empty list /
empty instance envelope, POST/PUT/DELETE → 200 no-op so
`linstor c kv set` doesn't trip on 405 in interactive probes.
- pkg/rest/controller_props.go rebased onto
ControllerConfig.Spec.ExtraProps via the apiserver Client.
Auto-creates the singleton ControllerConfig on first write.
- pkg/rest/encryption.go drops the Store-backed fallback;
requires the apiserver Client.
- pkg/rest tests get a shared `newFakeRESTClient` helper so
every server-with-store fixture gets a non-nil Client wired
by default.
Manifests regenerated (controller-gen + RBAC). The Secrets +
ControllerConfig RBAC entries were re-added manually after
controller-gen wiped them.
PLAN ticks: 705 (csi-snapshot-shippings) + 707 (kventries drop)
both close.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 7df3eba commit 49d210f
27 files changed
Lines changed: 215 additions & 2056 deletions
File tree
- api/v1alpha1
- config
- crd/bases
- rbac
- samples
- pkg
- effectiveprops
- rest
- store
- k8s
- storetest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
| 716 | + | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| |||
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 129 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
| |||
This file was deleted.
0 commit comments