Skip to content

Add guides for the storage version migration library - #719

Merged
sergenyalcin merged 2 commits into
crossplane:mainfrom
sergenyalcin:sv-migration-guides
Aug 3, 2026
Merged

Add guides for the storage version migration library#719
sergenyalcin merged 2 commits into
crossplane:mainfrom
sergenyalcin:sv-migration-guides

Conversation

@sergenyalcin

Copy link
Copy Markdown
Member

Description of your changes

This PR adds guides for the storage version migration library. They describe what is the flow and usage.

I have:

  • Read and followed Upjet's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Storage Version Migration

Layer / File(s) Summary
Migration workflow and provider integration
docs/storage-version-migration.md
Documents CRDMigrator discovery, object rewriting, stored-version updates, retry behavior, provider entry points, and scheme registration.
Init command deployment and RBAC
docs/storage-version-migration.md
Describes init command wiring, init-container execution through DeploymentRuntimeConfig, and permissions for patching CRD status.
Provider upgrade procedure
docs/applying-storage-version-migration.md
Adds prerequisites, upgrade manifests, verification commands, cleanup steps, and guidance for multiple sub-providers.
Standalone migrator CLI
docs/storage-version-migration.md
Documents dynamic and static CLI modes, CRD mappings, kubeconfig selection, and related documentation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: ulucinar, erhancagirici

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title is under 72 characters and clearly describes the addition of storage version migration guides.
Description check ✅ Passed The description directly explains that the pull request adds guides covering the storage version migration flow and usage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Configuration Api Breaking Changes ✅ Passed The PR diff against origin/main adds only two documentation files and contains no changes under pkg/config, so no configuration API breaking change exists.
Generated Code Manual Edits ✅ Passed The PR changes only two documentation files; the diff has no files matching **/zz_*.go.
Template Breaking Changes ✅ Passed The complete PR diff contains only two documentation files; no pkg/controller/external*.go templates changed.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/applying-storage-version-migration.md`:
- Around line 173-188: Update Step 5 to instruct users to remove or change the
Provider’s spec.runtimeConfigRef.name reference, apply the change, and wait for
the provider to become healthy before deleting the temporary
DeploymentRuntimeConfig. Clarify that shared RBAC resources must remain until
every migration sub-provider using them has completed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6aabf01a-812c-44fc-b86f-73b18434934a

📥 Commits

Reviewing files that changed from the base of the PR and between 4f6e6e1 and ee290f5.

📒 Files selected for processing (2)
  • docs/applying-storage-version-migration.md
  • docs/storage-version-migration.md

Comment thread docs/applying-storage-version-migration.md

@jonasz-lasut jonasz-lasut left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nit, commented under coderabbit's analysis. Other than that LGTM! Thank you @sergenyalcin

Comment thread docs/applying-storage-version-migration.md
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/applying-storage-version-migration.md`:
- Around line 189-195: Update the runtimeConfigRef restoration instructions
following the provider migration to use the provider’s recorded pre-migration
DeploymentRuntimeConfig name instead of hardcoding "default". Preserve the
kubectl patch example while making clear that the original runtime configuration
name captured before migration must be substituted, including for providers
using custom configurations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9956fac8-e2dc-485b-9fa3-2ab9ff27a10b

📥 Commits

Reviewing files that changed from the base of the PR and between ee290f5 and e919c34.

📒 Files selected for processing (1)
  • docs/applying-storage-version-migration.md

Comment on lines +189 to +195
If the provider normally uses another DeploymentRuntimeConfig, update the
reference to point back to it:

```shell
kubectl patch provider provider-gcp-storage --type=merge \
-p '{"spec":{"runtimeConfigRef":{"name":"default"}}}'
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Restore the provider’s actual previous runtime configuration.

The text says to restore the provider’s previous DeploymentRuntimeConfig, but the command always sets runtimeConfigRef.name to default. If the provider used a custom configuration, this changes its runtime behavior after migration. Record the original name before migration and use that name here.

Proposed adjustment
 kubectl patch provider provider-gcp-storage --type=merge \
-  -p '{"spec":{"runtimeConfigRef":{"name":"default"}}}'
+  -p '{"spec":{"runtimeConfigRef":{"name":"<previous-runtime-config-name>"}}}'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
If the provider normally uses another DeploymentRuntimeConfig, update the
reference to point back to it:
```shell
kubectl patch provider provider-gcp-storage --type=merge \
-p '{"spec":{"runtimeConfigRef":{"name":"default"}}}'
```
If the provider normally uses another DeploymentRuntimeConfig, update the
reference to point back to it:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/applying-storage-version-migration.md` around lines 189 - 195, Update
the runtimeConfigRef restoration instructions following the provider migration
to use the provider’s recorded pre-migration DeploymentRuntimeConfig name
instead of hardcoding "default". Preserve the kubectl patch example while making
clear that the original runtime configuration name captured before migration
must be substituted, including for providers using custom configurations.

@sergenyalcin
sergenyalcin merged commit 324a879 into crossplane:main Aug 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants