Commit fb9e1de
feat(api): ControllerConfig typed singleton CRD (Phase 10.4 step 1)
New cluster-scoped ControllerConfig CRD (singleton, name=default)
with structured fields:
Spec.DRBDOptions — typed cluster-wide DRBD overrides
Spec.PassphraseSecretRef — Secret pointer (no plaintext on Spec)
Spec.ExtraProps — forward-compat for un-typed keys
Phase 10.4 step 1 of the KVEntry-elimination plan. The
ControllerConfig becomes the typed home for what used to live in
the upstream-LINSTOR-shaped `ControllerProps` KVEntry instance —
admission validation now enforces enum constraints (via the same
+kubebuilder:validation:Enum markers that gate RD/RG DRBDOptions),
and structured tooling (kubectl edit, GitOps) can operate on it
directly.
ResourceReconciler.resolveEffectiveProps now feeds
ControllerConfig.Spec.DRBDOptions as the controller scope into
the typed hierarchy resolver (was nil before this commit) and
folds Spec.ExtraProps into the rendered Props bag. The legacy
KVEntry-shaped controllerProps() reader stays as the forward-
compat fallback for pre-migration clusters; both paths converge
on the same Props output so a partially-migrated cluster keeps
working.
Subsequent steps will migrate the cluster passphrase, csi-volumes,
and csi-snapshot-shippings KV instances onto their natural typed
homes; once all four migrate, the KVEntry CRD itself goes.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>1 parent 4803297 commit fb9e1de
4 files changed
Lines changed: 618 additions & 18 deletions
File tree
- api/v1alpha1
- config/crd/bases
- internal/controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments