Skip to content

initialization from script#996

Open
Bonusree wants to merge 16 commits into
masterfrom
fix
Open

initialization from script#996
Bonusree wants to merge 16 commits into
masterfrom
fix

Conversation

@Bonusree

@Bonusree Bonusree commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added new example manifests for initializing PerconaXtraDB and PgBouncer.
    • Updated ClickHouse, PerconaXtraDB, PgBouncer, and ProxySQL initialization guides with clearer instructions, verification steps, and credential guidance.
    • Refreshed ProxySQL initialization and reconfiguration examples and example outputs for both secret-based and inline flows.
  • Chores
    • Removed outdated Ignite version update documentation pages.

Bonusree added 5 commits July 1, 2026 17:10
Signed-off-by: Bonusree <bonusree@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
@Bonusree Bonusree changed the title initialization initialization from script Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d6a7ff3-f19c-425e-9c58-68b31ba24100

📥 Commits

Reviewing files that changed from the base of the PR and between 2993f55 and ae4381b.

📒 Files selected for processing (5)
  • docs/guides/percona-xtradb/initialization/script_source.md
  • docs/guides/pgbouncer/initialization/script_source.md
  • docs/guides/proxysql/initialization/examples/proxyops-add-users.yaml
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
  • docs/guides/proxysql/initialization/script_source.md
💤 Files with no reviewable changes (1)
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/guides/percona-xtradb/initialization/script_source.md

📝 Walkthrough

Walkthrough

This PR adds PerconaXtraDB and PgBouncer initialization manifests, updates ClickHouse, PerconaXtraDB, PgBouncer, and ProxySQL initialization guides, and removes the Ignite update-version documentation.

Changes

Initialization guides and examples

Layer / File(s) Summary
Database initialization examples and guide corrections
docs/examples/perconaxtradb/script-pxc.yaml, docs/examples/pgbouncer/initialization/init_script.yaml, docs/guides/clickhouse/initialization/script_source.md, docs/guides/percona-xtradb/initialization/script_source.md, docs/guides/pgbouncer/initialization/script_source.md
Adds PerconaXtraDB and PgBouncer manifests and updates initialization notes, source URLs, service names, credentials, verification commands, and related links.
ProxySQL bootstrap configuration
docs/guides/proxysql/initialization/script_source.md, docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
Documents Secret-based raw fragments and inline YAML initialization, with updated configuration examples, deployment steps, and behavior descriptions.
ProxySQL verification and user reconfiguration
docs/guides/proxysql/initialization/script_source.md, docs/guides/proxysql/initialization/examples/proxyops-add-users.yaml
Updates verification queries and output, documents empty inline users, and adds an OpsRequest example for adding users.
Ignite update-version docs removal
docs/guides/ignite/update-version/*
Removes the Ignite update-version index, overview, and guide pages.

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

Possibly related PRs

  • kubedb/docs#949: Overlaps with the initialization guides and examples updated in this PR.
  • kubedb/docs#985: Directly overlaps with the PerconaXtraDB initialization guide and manifest.
  • kubedb/docs#1000: Touches the Ignite update-version documentation removed in this PR.

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 matches the main theme of the changeset: documentation and examples for initialization from script.
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 fix
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch fix

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.

@Bonusree
Bonusree marked this pull request as draft July 7, 2026 05:48
Signed-off-by: Bonusree Datta <57539731+Bonusree@users.noreply.github.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: 4

Caution

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

⚠️ Outside diff range comments (1)
docs/guides/pgbouncer/initialization/script_source.md (1)

94-97: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Fix the PgBouncer init script URL

docs/guides/pgbouncer/initialization/script_source.md still points to docs/examples/pgbouncer/initialization/script-pgbouncer.yaml, but the example file in this tree is docs/examples/pgbouncer/initialization/init_script.yaml. Update the link so the tutorial doesn't 404.

🤖 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/pgbouncer/initialization/script_source.md` around lines 94 - 97,
The PgBouncer initialization example still references the old
script-pgbouncer.yaml path, which will 404. Update the kubectl create URL in the
script_source guide to point to the current init_script.yaml example under the
docs/examples/pgbouncer/initialization source, keeping the same versioned raw
GitHub pattern so the tutorial links to the correct file.
🤖 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/percona-xtradb/initialization/script_source.md`:
- Around line 343-356: The verification example in the kubectl exec/mysql
snippet uses a different hard-coded root password than the one shown above, so
update the command to use the same credential value as the preceding output.
Make the fix in the documentation block under the verification example so the
kubectl exec command is copy/pasteable without manual edits.

In `@docs/guides/proxysql/initialization/script_source.md`:
- Line 254: Tighten the verification statement in the initialization guide so it
only claims what the sample output actually demonstrates. In the prose around
the `proxysql-init-raw` Secret example, revise the sentence that mentions
`mysql_users`, `mysql_query_rules`, and global variables to avoid asserting
`mysql_query_rules` was verified unless the example output in that section
explicitly shows it.
- Line 370: The inline verification summary is too broad and currently claims
confirmation of mysqlQueryRules, mysqlVariables, and adminVariables even though
the visible output only shows global_variables. Update the wording in the
relevant documentation section to match what the query output actually proves,
or extend the verification steps in the same ProxySQL initialization walkthrough
so the missing mysqlQueryRules, mysqlVariables, and adminVariables checks are
explicitly shown before keeping the broader claim.
- Around line 204-210: The Secret-based example in the initialization
walkthrough is still using the inline-auth secret name and a mismatched mysql
password, so it cannot be replayed as written. Update the Secret-specific
credentials example to reference the correct Secret name for the secret-based
flow and make the mysql command use the same username/password shown immediately
above, keeping the walkthrough consistent with the secret_source section.

---

Outside diff comments:
In `@docs/guides/pgbouncer/initialization/script_source.md`:
- Around line 94-97: The PgBouncer initialization example still references the
old script-pgbouncer.yaml path, which will 404. Update the kubectl create URL in
the script_source guide to point to the current init_script.yaml example under
the docs/examples/pgbouncer/initialization source, keeping the same versioned
raw GitHub pattern so the tutorial links to the correct file.
🪄 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: f8138917-1468-49d1-967c-bb484f4f527d

📥 Commits

Reviewing files that changed from the base of the PR and between 77939ec and 2993f55.

📒 Files selected for processing (9)
  • docs/examples/perconaxtradb/script-pxc.yaml
  • docs/examples/pgbouncer/initialization/init_script.yaml
  • docs/guides/clickhouse/initialization/script_source.md
  • docs/guides/ignite/update-version/_index.md
  • docs/guides/ignite/update-version/overview.md
  • docs/guides/ignite/update-version/update-version.md
  • docs/guides/percona-xtradb/initialization/script_source.md
  • docs/guides/pgbouncer/initialization/script_source.md
  • docs/guides/proxysql/initialization/script_source.md
💤 Files with no reviewable changes (3)
  • docs/guides/ignite/update-version/update-version.md
  • docs/guides/ignite/update-version/overview.md
  • docs/guides/ignite/update-version/_index.md

Comment thread docs/guides/percona-xtradb/initialization/script_source.md
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Comment thread docs/guides/pgbouncer/initialization/script_source.md
Comment thread docs/guides/clickhouse/initialization/script_source.md
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Signed-off-by: Bonusree <bonusree@appscode.com>
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
Comment thread docs/guides/proxysql/initialization/script_source.md Outdated
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

https://kubedb-v2-hugo--pr996-fix-5pnhdxwt.web.app

(expires Wed, 22 Jul 2026 05:45:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

Bonusree added 3 commits July 8, 2026 15:27
Signed-off-by: Bonusree <bonusree@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
# Conflicts:
#	docs/guides/clickhouse/initialization/script_source.md
#	docs/guides/percona-xtradb/initialization/script_source.md
#	docs/guides/pgbouncer/initialization/script_source.md
#	docs/guides/postgres/initialization/script_source.md
#	docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
#	docs/guides/proxysql/initialization/script_source.md

Signed-off-by: Bonusree <bonusree@appscode.com>
@gitguardian

gitguardian Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34433002 Triggered Generic CLI Secret ec54da8 docs/guides/percona-xtradb/initialization/script_source.md View secret
34433003 Triggered Generic CLI Secret ec54da8 docs/guides/clickhouse/initialization/script_source.md View secret
34433003 Triggered Generic CLI Secret ec54da8 docs/guides/clickhouse/initialization/script_source.md View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Comment thread docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml Outdated
Signed-off-by: Bonusree <bonusree@appscode.com>

@ShuvoKumarMondal ShuvoKumarMondal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM for ClickHouse.

@Bonusree
Bonusree marked this pull request as ready for review July 15, 2026 04:21

@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

🤖 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/pgbouncer/initialization/script_source.md`:
- Line 55: Update the initialization script note to instruct users to obtain
PostgreSQL authentication credentials from a Secret-backed source, such as
quick-postgres-auth, rather than embedding passwords in the ConfigMap-backed
init.sh script. Preserve the guidance that custom scripts may perform
environment-specific setup.

In `@docs/guides/proxysql/initialization/script_source.md`:
- Around line 447-449: Update the ProxySQL administration command in the
initialization guide to use the previously generated $ADMIN_USER and $ADMIN_PASS
variables from the host shell instead of hard-coded admin/admin credentials.
Invoke the MySQL client directly through kubectl with those variables while
preserving the existing namespace, pod, host, port, and prompt settings.
🪄 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: 3d6a7ff3-f19c-425e-9c58-68b31ba24100

📥 Commits

Reviewing files that changed from the base of the PR and between 2993f55 and ae4381b.

📒 Files selected for processing (5)
  • docs/guides/percona-xtradb/initialization/script_source.md
  • docs/guides/pgbouncer/initialization/script_source.md
  • docs/guides/proxysql/initialization/examples/proxyops-add-users.yaml
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
  • docs/guides/proxysql/initialization/script_source.md
💤 Files with no reviewable changes (1)
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/guides/percona-xtradb/initialization/script_source.md

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🤖 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/pgbouncer/initialization/script_source.md`:
- Line 55: Update the initialization script note to instruct users to obtain
PostgreSQL authentication credentials from a Secret-backed source, such as
quick-postgres-auth, rather than embedding passwords in the ConfigMap-backed
init.sh script. Preserve the guidance that custom scripts may perform
environment-specific setup.

In `@docs/guides/proxysql/initialization/script_source.md`:
- Around line 447-449: Update the ProxySQL administration command in the
initialization guide to use the previously generated $ADMIN_USER and $ADMIN_PASS
variables from the host shell instead of hard-coded admin/admin credentials.
Invoke the MySQL client directly through kubectl with those variables while
preserving the existing namespace, pod, host, port, and prompt settings.
🪄 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: 3d6a7ff3-f19c-425e-9c58-68b31ba24100

📥 Commits

Reviewing files that changed from the base of the PR and between 2993f55 and ae4381b.

📒 Files selected for processing (5)
  • docs/guides/percona-xtradb/initialization/script_source.md
  • docs/guides/pgbouncer/initialization/script_source.md
  • docs/guides/proxysql/initialization/examples/proxyops-add-users.yaml
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
  • docs/guides/proxysql/initialization/script_source.md
💤 Files with no reviewable changes (1)
  • docs/guides/proxysql/initialization/examples/proxysql-init-inline.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/guides/percona-xtradb/initialization/script_source.md
🛑 Comments failed to post (2)
docs/guides/pgbouncer/initialization/script_source.md (1)

55-55: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n -C3 'init:|secret|Secret|configMap' docs/examples/pgbouncer docs/guides/pgbouncer

Repository: kubedb/docs

Length of output: 50370


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- docs/guides/pgbouncer/initialization/script_source.md (around lines 45-60) ---'
sed -n '45,60p' docs/guides/pgbouncer/initialization/script_source.md

echo
echo '--- docs/guides/pgbouncer/initialization/script_source.md (around lines 160-175) ---'
sed -n '160,175p' docs/guides/pgbouncer/initialization/script_source.md

echo
echo '--- secret / credential references in PgBouncer initialization docs ---'
rg -n -C2 'secret|Secret|credential|password' docs/guides/pgbouncer/initialization/*.md docs/examples/pgbouncer/initialization/*.yaml

Repository: kubedb/docs

Length of output: 8919


Avoid putting PostgreSQL credentials in the ConfigMap-backed init script.
Point users to a Secret-backed source for auth instead of suggesting they include passwords in init.sh; the later example already shows the password coming from quick-postgres-auth.

🤖 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/pgbouncer/initialization/script_source.md` at line 55, Update the
initialization script note to instruct users to obtain PostgreSQL authentication
credentials from a Secret-backed source, such as quick-postgres-auth, rather
than embedding passwords in the ConfigMap-backed init.sh script. Preserve the
guidance that custom scripts may perform environment-specific setup.
docs/guides/proxysql/initialization/script_source.md (1)

447-449: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use the generated ProxySQL credentials instead of admin/admin.

The earlier steps retrieve credentials from proxy-init-inline-auth, but this command uses a different hard-coded pair and will not replay the documented setup reliably. Execute the MySQL client directly with $ADMIN_USER and $ADMIN_PASS from the host shell.

Proposed fix
- kubectl exec -it -n demo proxy-init-inline-0 -- bash
- proxysql@proxy-init-inline-0:/$ mysql -uadmin -padmin -h127.0.0.1 -P6032 --prompt "ProxySQLAdmin > "
+$ kubectl exec -it -n demo proxy-init-inline-0 -- mysql \
+    -u"$ADMIN_USER" -p"$ADMIN_PASS" -h 127.0.0.1 -P 6032 \
+    --prompt "ProxySQLAdmin > "
📝 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.

$ kubectl exec -it -n demo proxy-init-inline-0 -- mysql \
    -u"$ADMIN_USER" -p"$ADMIN_PASS" -h 127.0.0.1 -P 6032 \
    --prompt "ProxySQLAdmin > "
🤖 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/proxysql/initialization/script_source.md` around lines 447 - 449,
Update the ProxySQL administration command in the initialization guide to use
the previously generated $ADMIN_USER and $ADMIN_PASS variables from the host
shell instead of hard-coded admin/admin credentials. Invoke the MySQL client
directly through kubectl with those variables while preserving the existing
namespace, pod, host, port, and prompt settings.

Signed-off-by: souravbiswassanto <saurov@appscode.com>
Signed-off-by: Bonusree <bonusree@appscode.com>
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.

5 participants