Add storage-version migration docs + upgrade-guide walkthrough#5451
Open
ChrisJBurns wants to merge 1 commit into
Open
Add storage-version migration docs + upgrade-guide walkthrough#5451ChrisJBurns wants to merge 1 commit into
ChrisJBurns wants to merge 1 commit into
Conversation
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>
12 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5451 +/- ##
==========================================
- Coverage 68.85% 68.84% -0.02%
==========================================
Files 634 634
Lines 64437 64439 +2
==========================================
- Hits 44371 44364 -7
- Misses 16789 16794 +5
- Partials 3277 3281 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-facing documentation for the StorageVersionMigrator controller, now that the controller (PR #5362), opt-in labels + CI guard (PR #5391), and chart-side feature flag (PR #5418) are all on main.
Two files:
docs/operator/storage-version-migration.md— reference doc explaining the mechanism, label contract, opt-in flag, admission-policy compatibility, and the skip-a-version upgrade trap.docs/operator/upgrade-guide/— kind-cluster reproducible end-to-end walkthrough of the v1alpha1→v1beta1 graduation, plus CR fixtures for all 12 graduated CRDs.Supersedes #5011, which carried an earlier draft of the same docs against the pre-review design (SSA on /status, exclude marker, default-on). The content here matches what actually shipped on main.
Part of #4969.
Medium level
Reference doc highlights:
RequeueAfter: 30son the sentinel path (not exponential backoff).kube-storage-version-migratorsemantics — a Conflict on Update means another writer succeeded, which already re-encoded the CR at the storage version.+kubebuilder:metadata:labels=toolhive.stacklok.dev/auto-migrate-storage-version=true. CI testTestStorageVersionRootMarkerCoverageenforces this; no self-serve exclude marker exists.kube-storage-version-migrator).Upgrade-guide walkthrough:
Low level
docs/operator/storage-version-migration.mddocs/operator/upgrade-guide/README.mddocs/operator/upgrade-guide/crs-v1alpha1.yamldocs/operator/upgrade-guide/crs-v1beta1.yamlType of change
Test plan
cmd/thv-operator/controllers/storageversionmigrator_controller.go— mechanism, retry semantics, error events, RBAC, label contract all match.TOOLHIVE_ENABLE_STORAGE_VERSION_MIGRATOR(PR-A's rename).TestStorageVersionRootMarkerCoverage(PR-B's rename).false) matchesvalues.yamlon main.Why a separate PR
PR #5418 deliberately shipped only the chart surface so the reviewer could focus on the helm bits without the doc volume. This PR is the docs companion. They could have been combined; splitting was a reviewer-ergonomics choice.
Follow-ups for #4969 closure
After this PR merges, only deferred follow-ups remain:
app/app.go(paired with a future chart-default flip).MigrationStuckCondition + Warning event.None of these are blocking the user-facing rollout. #4969 can close once this lands.
Generated with Claude Code