Commit c6db2d9
Add storage-version migration docs + upgrade-guide walkthrough (#5451)
* Add storage-version migration docs + upgrade-guide walkthrough
End-to-end user documentation for the StorageVersionMigrator
controller now that the chart surface (PR #5418) is in main.
Reference doc — docs/operator/storage-version-migration.md:
- Describes the actual shipped mechanism: plain Get+Update on the
main resource, per-CR conflict retry (max 3), RequeueAfter
sentinel on the conflict path.
- Admission-policy compatibility section: webhooks fire on every
Update before the bytes-equality elision check, so policies
(Kyverno/Gatekeeper/OPA) that reject same-spec round-trip
Updates will prevent the migrator from converging.
- ⚠ Skip-a-version upgrade trap section: clusters that bypass an
intermediate release that runs the migrator will hit a helm
upgrade failure at the version-removal release;
kube-storage-version-migrator documented as the recovery path.
- Label contract reflects the no-escape-hatch rule from PR-B —
every storage-version root type must carry the migrate marker.
- RBAC list matches what's actually on main.
Upgrade-guide walkthrough — docs/operator/upgrade-guide/:
- Reproducible kind-cluster end-to-end test of the v1alpha1→v1beta1
graduation, verifying storedVersions converges to [v1beta1] on
all 12 graduated CRDs after enabling the migrator.
- CR fixtures for v1alpha1 and v1beta1 of all 12 graduated kinds.
Supersedes #5011, which carried earlier-draft versions that
described the pre-review SSA-on-/status mechanism, the removed
exclude marker, and the old env-var name.
Part of #4969.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Scope upgrade walkthrough to the 12 graduated CRDs explicitly
Addresses six review findings on PR #5451:
F1 (HIGH): The chart ships 13 labeled CRDs, not 12. The 13th
(mcpwebhookconfigs) is single-version v1alpha1 and not part of
the v1alpha1 → v1beta1 graduation this walkthrough demonstrates.
Adds a scope note in the intro and introduces an explicit
GRADUATED_CRDS array in Step 2 used by every verification loop
in steps 8–11 so the loops don't drift.
F2 (HIGH): Step 11's bulk patch loop previously iterated every
toolhive CRD. For mcpwebhookconfigs the jq filter "map(select(
.name != "v1alpha1"))" produces an empty array and the apiserver
rejects the patch. Scoping the loop to GRADUATED_CRDS fixes
this — only multi-version CRDs are touched.
F3 (MED): Step 8's baseline "every line ends with
[v1alpha1,v1beta1]" was false for the 13th CRD which reads
[v1alpha1]. Loop now iterates GRADUATED_CRDS only; the scope
note explains why the 13th is excluded.
F4 (MED): Step 9's convergence loop hardcoded "12" and silently
exited if convergence never landed. Loop count is now derived
from ${#GRADUATED_CRDS[@]} so a future PR adding a graduated CRD
won't drift, and a post-loop conditional surfaces an actionable
timeout message naming exactly what didn't converge.
F5 (LOW): The companion-reading bullet described the reference
doc as covering "label contract, opt-out, mechanism." The doc
explicitly removed the exclude marker in PR-B; it's an opt-in
model. Reworded.
F6 (LOW): Steps 5 and 9 selected a pod via "kubectl get pods |
grep | head -1", which can read the still-Terminating old pod
after a helm upgrade and show the pre-upgrade env value.
Replaced with a Deployment-spec jsonpath read that avoids the
race entirely. Step 10 still uses pod selection (logs aren't
readable off a Deployment) but with --field-selector=status.phase=Running.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Enable migrator flag explicitly in upgrade step 9
Step 9 set only the three image values on the helm upgrade, so the
StorageVersionMigrator never turned on: the chart defaults
operator.features.storageVersionMigrator to false, and helm upgrade does
not reuse the previous release's --set values, so the env var rendered as
false and storedVersions stayed stuck at [v1alpha1, v1beta1]. Following
the guide verbatim never converged the CRDs.
Add --set operator.features.storageVersionMigrator=true to step 9 and note
why it is required. Verified end-to-end against a local kind cluster: all
12 graduated CRDs converge to [v1beta1] with the flag set.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ad127f7 commit c6db2d9
4 files changed
Lines changed: 801 additions & 0 deletions
File tree
- docs/operator
- upgrade-guide
| 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 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
0 commit comments