Add Postgres 12→14 in-place upgrade script for CircleCI Server#79
Open
soulchips wants to merge 2 commits into
Open
Add Postgres 12→14 in-place upgrade script for CircleCI Server#79soulchips wants to merge 2 commits into
soulchips wants to merge 2 commits into
Conversation
upgrade-postgres-to-14.sh renders and applies a one-shot pg_upgrade --link Job against the existing postgres PVC, then prints the helm values block and helm upgrade command operators need to roll forward. The script auto-discovers PVC, secret, and source-cluster encoding/locale, verifies the application layer is scaled to 0, scales the postgres StatefulSet down itself, and streams Job logs until the Complete condition is observed. Defaults pull from ACR; --dockerhub switches to Docker Hub. Flags cover encoding/locale overrides, custom tags, and dry-run rendering. README documents the full end-to-end procedure (snapshot, quiesce, run, helm upgrade, validate, clean up), what the script intentionally does NOT do (backups, app-layer scaling, helm upgrade), and troubleshooting for the common pg_upgrade failure modes — locale mismatch, missing extensions, re-running after a failed Job. ONPREM-3305 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Double-quote $PV_FOR_SCALE inside the kubectl jsonpath so shellcheck stops flagging it as susceptible to word-splitting/globbing. The substituted value is a Kubernetes-generated PV name with no whitespace or glob characters, so behavior is unchanged — this is just to keep the shellcheck CI job green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
upgrade-postgres-to-14.sh renders and applies a one-shot pg_upgrade --link Job against the existing postgres PVC, then prints the helm values block and helm upgrade command operators need to roll forward.
The script auto-discovers PVC, secret, and source-cluster encoding/locale, verifies the application layer is scaled to 0, scales the postgres StatefulSet down itself, and streams Job logs until the Complete condition is observed. Defaults pull from ACR; --dockerhub switches to Docker Hub. Flags cover encoding/locale overrides, custom tags, and dry-run rendering.
README documents the full end-to-end procedure (snapshot, quiesce, run, helm upgrade, validate, clean up), what the script intentionally does NOT do (backups, app-layer scaling, helm upgrade), and troubleshooting for the common pg_upgrade failure modes — locale mismatch, missing extensions, re-running after a failed Job.
ONPREM-3305
⚙️ Issue
✅ Fix
❓ Tests