Skip to content

added mssql-server migration doc#1030

Open
PulokSaha0706 wants to merge 2 commits into
masterfrom
mssqlserver-migration-docs
Open

added mssql-server migration doc#1030
PulokSaha0706 wants to merge 2 commits into
masterfrom
mssqlserver-migration-docs

Conversation

@PulokSaha0706

@PulokSaha0706 PulokSaha0706 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added MSSQL Server migration example manifests, including source/target configuration, snapshot and streaming settings, and TLS wiring.
  • Documentation
    • Added end-to-end MSSQL Server migration guide with prerequisites, deployment steps, progress/verification, CDC testing, and cutover.
    • Added documentation for the MSSQLServerMigration resource, including phases and status.
    • Updated migration docs navigation and listed MSSQL Server as a supported database migration target.

Signed-off-by: Pulok Saha <puloksaha@appscode.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds MSSQL Server migration documentation, example manifests, CRD configuration guidance, source and target setup instructions, migration monitoring steps, CDC validation, and cutover procedures.

Changes

MSSQL Server migration documentation

Layer / File(s) Summary
Migration CRD concepts and navigation
docs/guides/mssqlserver/concepts/migrator.md, docs/guides/mssqlserver/migration/_index.md, docs/operatormanual/migration/README.md
Documents the MSSQLServerMigration specification, phases, status fields, related links, migration navigation, and MSSQL Server support entry.
Source and target environment setup
docs/guides/mssqlserver/migration/databaseMigration.md, docs/examples/mssqlserver/migration/source-issuer.yaml, docs/examples/mssqlserver/migration/target-mssqlserver.yaml
Describes source database preparation, credentials, AppBinding configuration, target TLS setup, and target MSSQLServer creation.
Migration execution and validation
docs/examples/mssqlserver/migration/mssqlserver-migration.yaml, docs/guides/mssqlserver/migration/databaseMigration.md
Adds a migration manifest and documents applying the resource, monitoring progress, verifying snapshots, testing CDC streaming, and performing cutover.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • kubedb/docs#887: Adds related supported-database migration documentation.
  • kubedb/docs#983: Adds or fixes the cert-manager Issuer documentation referenced by the MSSQL Server migration examples.
  • kubedb/docs#999: Extends per-engine migration CRD documentation and examples.

Suggested reviewers: kodiak-appscode, ArnobKumarSaha, anisurrahman75

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding MSSQL Server migration documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mssqlserver-migration-docs

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

🧹 Nitpick comments (2)
docs/guides/mssqlserver/migration/databaseMigration.md (2)

110-116: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add language specifiers to fenced output blocks.

Three fenced code blocks showing expected output (lines 110, 381, 426) lack a language specifier, triggering MD040. Adding text as the language improves lint compliance and syntax highlighting consistency.

✏️ Proposed fix (line 110 example)
-```
+```text
 CustomerID  Name   Email              City     CreatedAt
 ----------- ------ ------------------ -------- -----------------------

Also applies to: 381-387, 426-432

🤖 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/guides/mssqlserver/migration/databaseMigration.md` around lines 110 -
116, Add the text language specifier to the three fenced code blocks showing
expected output, including the blocks near the CustomerID table and the sections
referenced around lines 381 and 426. Update each opening fence from ``` to
```text while leaving the output contents unchanged.

324-326: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify the watch command presentation.

Line 325 shows Every 2.0s: kubectl get mssqlservermigrations -n demo inside a bash code block, which reads as a command to run. This is actually the header line from watch output. Consider either showing the actual command (watch kubectl get mssqlservermigrations -n demo) or separating the command from its output.

✏️ Proposed fix
 ```bash
-$ Every 2.0s: kubectl get mssqlservermigrations -n demo
+$ watch kubectl get mssqlservermigrations -n demo
🤖 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/guides/mssqlserver/migration/databaseMigration.md` around lines 324 -
326, Clarify the watch example by replacing the displayed output header with the
executable command `watch kubectl get mssqlservermigrations -n demo` in the
relevant migration guide code block, or separate the command from its sample
output.
🤖 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/guides/mssqlserver/migration/databaseMigration.md`:
- Around line 374-377: Update the sqlcmd executable path in the database
migration example to /opt/mssql-tools18/bin/sqlcmd, keeping the existing kubectl
command and arguments unchanged.

---

Nitpick comments:
In `@docs/guides/mssqlserver/migration/databaseMigration.md`:
- Around line 110-116: Add the text language specifier to the three fenced code
blocks showing expected output, including the blocks near the CustomerID table
and the sections referenced around lines 381 and 426. Update each opening fence
from ``` to ```text while leaving the output contents unchanged.
- Around line 324-326: Clarify the watch example by replacing the displayed
output header with the executable command `watch kubectl get
mssqlservermigrations -n demo` in the relevant migration guide code block, or
separate the command from its sample output.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a93c205-3229-46bd-9e82-2aff720c4add

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb820a and 0a0d7e5.

📒 Files selected for processing (7)
  • docs/examples/mssqlserver/migration/mssqlserver-migration.yaml
  • docs/examples/mssqlserver/migration/source-issuer.yaml
  • docs/examples/mssqlserver/migration/target-mssqlserver.yaml
  • docs/guides/mssqlserver/concepts/migrator.md
  • docs/guides/mssqlserver/migration/_index.md
  • docs/guides/mssqlserver/migration/databaseMigration.md
  • docs/operatormanual/migration/README.md

Comment thread docs/guides/mssqlserver/migration/databaseMigration.md
Signed-off-by: Pulok Saha <puloksaha@appscode.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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/guides/mssqlserver/migration/databaseMigration.md (1)

110-116: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mark the timestamps as illustrative.

The data is generated with GETDATE(), so fixed 2026-07-10 timestamps will not match most executions and may make valid migration output appear incorrect. Use placeholder timestamps or explicitly label them as illustrative.

🤖 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/guides/mssqlserver/migration/databaseMigration.md` around lines 110 -
116, Mark the fixed CreatedAt timestamps in the example output as illustrative,
or replace them with placeholder values, since the migration uses GETDATE() and
actual execution times will differ.
🤖 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/guides/mssqlserver/migration/databaseMigration.md`:
- Line 325: Remove the `$` prompt marker from the `watch kubectl get
mssqlservermigrations -n demo` example, or add representative command output
beneath it so the prompt is justified and markdownlint MD014 passes.
- Around line 375-376: Update the database migration documentation’s sqlcmd
examples to avoid inline or echoed SA passwords: use an interactive prompt or
another non-logged secret-injection method, and remove any commands that print
the decoded secret. Apply this consistently to the Customer query and the
related kubectl secret/sqlcmd examples.

---

Outside diff comments:
In `@docs/guides/mssqlserver/migration/databaseMigration.md`:
- Around line 110-116: Mark the fixed CreatedAt timestamps in the example output
as illustrative, or replace them with placeholder values, since the migration
uses GETDATE() and actual execution times will differ.
🪄 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7971680a-1909-48c4-978b-0a436550036b

📥 Commits

Reviewing files that changed from the base of the PR and between 0a0d7e5 and eefd758.

📒 Files selected for processing (1)
  • docs/guides/mssqlserver/migration/databaseMigration.md

Let's wait for the Migration to finish the schema and snapshot phases and enter the streaming phase. Run the following command to watch `MSSQLServerMigration` CR:

```bash
$ watch kubectl get mssqlservermigrations -n demo

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the $ prompt marker or show command output.

This command triggers markdownlint MD014 because it begins with $ but has no corresponding output.

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 325-325: Dollar signs used before commands without showing output

(MD014, commands-show-output)

🤖 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/guides/mssqlserver/migration/databaseMigration.md` at line 325, Remove
the `$` prompt marker from the `watch kubectl get mssqlservermigrations -n demo`
example, or add representative command output beneath it so the prompt is
justified and markdownlint MD014 passes.

Source: Linters/SAST tools

Comment on lines +375 to +376
$ kubectl exec -it -n demo mssqlserver-standalone-0 -- /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P '<sa-password>' -C -Q "SELECT * FROM RestaurantMigrationDB.dbo.Customers"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '360,430p' docs/guides/mssqlserver/migration/databaseMigration.md | cat -n

Repository: kubedb/docs

Length of output: 3124


🏁 Script executed:

nl -ba docs/guides/mssqlserver/migration/databaseMigration.md | sed -n '380,430p'

Repository: kubedb/docs

Length of output: 185


🏁 Script executed:

python3 - <<'PY'
from pathlib import Path
path = Path('docs/guides/mssqlserver/migration/databaseMigration.md')
for start, end in [(380, 430)]:
    for i, line in enumerate(path.read_text().splitlines(), 1):
        if start <= i <= end:
            print(f"{i:4d}: {line}")
PY

Repository: kubedb/docs

Length of output: 2055


Avoid printing or inlining the SA password here. The kubectl get secret ... | base64 -d example at line 389 echoes the decoded secret, and the -P argument at lines 420-421 would expose the password in shell history and process listings if copied as written. Use an interactive prompt or another non-logged secret-injection path, and keep the decoded password out of the docs.

🤖 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/guides/mssqlserver/migration/databaseMigration.md` around lines 375 -
376, Update the database migration documentation’s sqlcmd examples to avoid
inline or echoed SA passwords: use an interactive prompt or another non-logged
secret-injection method, and remove any commands that print the decoded secret.
Apply this consistently to the Customer query and the related kubectl
secret/sqlcmd examples.

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit eefd758):

https://kubedb-v2-hugo--pr1030-mssqlserver-migratio-0bmqm9jm.web.app

(expires Fri, 17 Jul 2026 11:36:38 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

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.

1 participant