Skip to content

docs(mongodb): fix broken commands, example refs, and container names found by executing the guides#989

Merged
tamalsaha merged 2 commits into
masterfrom
docs-refresh-mongodb-2
Jul 6, 2026
Merged

docs(mongodb): fix broken commands, example refs, and container names found by executing the guides#989
tamalsaha merged 2 commits into
masterfrom
docs-refresh-mongodb-2

Conversation

@tamalsaha

@tamalsaha tamalsaha commented Jul 6, 2026

Copy link
Copy Markdown
Member

Found by re-executing the MongoDB guides on a live KubeDB v2026.6.19 cluster (single-node k3s). Every fix below was confirmed on-cluster or against the source of truth (apimachinery API/ops types, example YAMLs) before editing.

Executable command fixes

  • kubectl get ...,sts,... -> ...,petset,... in the resource-listing commands. The KubeDB workload is a PetSet CR (apps.k8s.appscode.com), so kubectl get sts returns nothing. Verified kubectl get sts -n demo -> No resources found. Files: quickstart/quickstart.md (3x), clustering/{replicaset,sharding,standalone}.md, arbiter/{replicaset,sharding}.md, hidden-node/sharding.md.
  • podTemplate container name: mongo -> name: mongodb in clustering/standalone.md and configuration/using-podtemplate.md. The operator's container is mongodb; with name: mongo the resource/args overrides are silently dropped. Verified on cluster: name: mongo yielded default 800m/1536Mi, whereas the example's name: mongodb correctly applied cpu=250m/mem=1Gi and --maxConns=100.

Broken example-YAML references (raw fetch 404)

  • configuration/using-config-file.md: configuration/replicaset.yaml (does not exist) -> configuration/demo-1.yaml (matches inline mgo-custom-config; deployed successfully, net.maxIncomingConnections=10000 verified).
  • initialization/using-script.md: Initialization/replicaset.yaml (does not exist) -> Initialization/demo-1.yaml (matches inline mgo-init-script).
  • initialization/gitsync.md: lowercase initialization/git-sync-public.yaml -> Initialization/git-sync-public.yaml (directory is case-sensitive Initialization).

Wrong field / secret key

  • initialization/using-script.md: auth-secret example used key user: -> username: (basic-auth key; the guide's own prose and jsonpath already use username).
  • rotate-auth/rotateauth.md: jq .spec.authsecret.name -> .spec.authSecret.name (3x + prose). Verified the lowercase form returns null; .spec.authSecret.name returns the secret name. Source: apimachinery/apis/kubedb/v1/mongodb_types.go (json:"authSecret").

Minor

  • rotate-auth/rotateauth.md: filename typo mongobd.yaml -> mongodb.yaml; hardcoded raw/v2025.6.30/... URL -> {{ .version }} template (matching the rest of the file).
  • quickstart/quickstart.md: fixed garbled Check 0 text and replaced the corrupt kubectl get mongodbversions output table (misaligned columns / nonsensical rows from a prior bad find-replace) with the real current-cluster output.

Verified but NOT changed

  • apiVersion: kubedb.com/v1 is correct for MongoDB (kept).
  • The rotate-auth base YAML using apiVersion: kubedb.com/v1alpha2 + terminationPolicy applies fine (conversion webhook stores it as v1/deletionPolicy); left as-is.

Summary by CodeRabbit

  • Documentation
    • Updated multiple MongoDB guides to reflect current resource names and example commands.
    • Fixed several walkthroughs to use petset in Kubernetes listings instead of sts.
    • Corrected example file references, command paths, and JSON field casing for setup and verification steps.
    • Refreshed quickstart sample output to show newer MongoDB version examples and updated resource listings.

… found by executing the guides

- get sts -> get petset in resource-listing commands (workload is a PetSet CR, get sts returns nothing): quickstart, clustering/{replicaset,sharding,standalone}, arbiter/{replicaset,sharding}, hidden-node/sharding
- podTemplate container name mongo -> mongodb (name mongo silently drops resource/args overrides): clustering/standalone, configuration/using-podtemplate
- fix nonexistent/mis-cased example YAML refs: configuration/using-config-file (replicaset.yaml -> demo-1.yaml), initialization/using-script (replicaset.yaml -> demo-1.yaml), initialization/gitsync (initialization -> Initialization)
- initialization/using-script auth-secret key user -> username
- rotate-auth: jq .spec.authsecret.name -> .spec.authSecret.name (lowercase returns null), filename typo mongobd.yaml -> mongodb.yaml, hardcoded raw/v2025.6.30 URL -> version template
- quickstart: fix garbled 'Check 0' text and regenerate the corrupt mongodbversions output table

Signed-off-by: Tamal Saha <tamal@appscode.com>
kodiak-appscode[bot]
kodiak-appscode Bot previously approved these changes Jul 6, 2026
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@tamalsaha, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 21 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f7a4218e-3886-4dfa-b2dd-fd044315ecf9

📥 Commits

Reviewing files that changed from the base of the PR and between 4cc00e7 and 6a0bef7.

📒 Files selected for processing (3)
  • docs/examples/mongodb/initialization/demo-1.yaml
  • docs/examples/mongodb/initialization/git-sync-public.yaml
  • docs/guides/mongodb/initialization/using-script.md
📝 Walkthrough

Walkthrough

This PR updates MongoDB documentation guides across arbiter, clustering, configuration, hidden-node, initialization, quickstart, and rotate-auth sections. Changes replace sts resource references with petset, correct container names, fix example manifest URLs/filenames, and correct authSecret field casing in jq commands.

Changes

MongoDB documentation fixes

Layer / File(s) Summary
sts to petset resource listing
docs/guides/mongodb/arbiter/replicaset.md, docs/guides/mongodb/arbiter/sharding.md, docs/guides/mongodb/clustering/replicaset.md, docs/guides/mongodb/clustering/sharding.md, docs/guides/mongodb/clustering/standalone.md, docs/guides/mongodb/hidden-node/sharding.md, docs/guides/mongodb/quickstart/quickstart.md
Example kubectl get commands in Halt/Delete/WipeOut sections updated to query petset instead of sts resources; quickstart MongoDBVersion output table also refreshed.
Container name and manifest reference fixes
docs/guides/mongodb/clustering/standalone.md, docs/guides/mongodb/configuration/using-config-file.md, docs/guides/mongodb/configuration/using-podtemplate.md, docs/guides/mongodb/initialization/gitsync.md, docs/guides/mongodb/initialization/using-script.md
Container name fields changed from mongo to mongodb; example manifest URLs updated to demo-1.yaml and Initialization path casing; Secret example key changed from user to username.
rotate-auth guide field casing and filename fixes
docs/guides/mongodb/rotate-auth/rotateauth.md
Fixed mongobd.yaml typo to mongodb.yaml, corrected authsecret.name to authSecret.name in jq commands, updated secretRef description bullet, and switched hard-coded version path to templated {{ .version }}.

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

Possibly related PRs

  • kubedb/docs#951: Both PRs update documentation commands to use petset instead of sts across MongoDB guides.
  • kubedb/docs#954: Overlapping stspetset corrections in the same MongoDB guide files including arbiter, clustering, and quickstart docs.

Suggested reviewers: kodiak-appscode

🚥 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 accurately summarizes the doc fixes: broken commands, example references, and container name corrections found by running the guides.
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 docs-refresh-mongodb-2

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.

…d references

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha
tamalsaha merged commit 47eed28 into master Jul 6, 2026
5 of 7 checks passed
@tamalsaha
tamalsaha deleted the docs-refresh-mongodb-2 branch July 6, 2026 15:21
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