fix: remove hardcoded postgres.host from prod/preprod helmreleases#3333
Open
yodem wants to merge 1 commit into
Open
fix: remove hardcoded postgres.host from prod/preprod helmreleases#3333yodem wants to merge 1 commit into
yodem wants to merge 1 commit into
Conversation
Production and preprod now source DATABASES_HOST from the
local-settings-secrets-production secret instead of hardcoding
the postgres host in the HelmRelease values.
The chart template already has the fallback:
os.getenv("DATABASES_HOST") when postgres.host is unset.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📊 Code Quality Score: 2/100
Scored by GitVelocity · How are scores calculated? |
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.
Summary
postgres.hostfrom prod and preprod HelmRelease valuesDATABASES_HOSTfrom thelocal-settings-secrets-productionsecretos.getenv("DATABASES_HOST")whenpostgres.hostis unset (local-settings-file.yaml:90)Prerequisite: infrastructure secret update
The current
DATABASES_HOSTinlocal-settings-secrets-productionis stale — it points toprod1-pgbouncer.default.svc(from the pre-migration setup). It must be updated topostgres-18before this PR lands.How it works
The chart template at
helm-chart/sefaria/templates/configmap/local-settings-file.yaml:90:When
postgres.hostis not set in values, Django readsDATABASES_HOSTfrom the environment (injected from the secret viaenvFrom).Test plan
DATABASES_HOST→postgres-18postgres-18(check Django logs or admin)DATABASES_HOST: "postgres")