chart: refuse a half-configured external PostgreSQL - #12
Merged
Merged
Conversation
`postgresql.embedded.enabled: false` already dropped the bundled StatefulSet, its Service and its ingress NetworkPolicy, but three values kept defaults that only make sense while that server exists: - `database.host` still named `sites-postgres`; - `database.runtimeHost` still resolved that Service's in-cluster DNS name for the tenant-facing runtime Secret; - `SITES_DB_SSLMODE` was hardcoded `disable`. Each one renders, applies and rolls out while the control plane dials a Service this render declined to create, so all three now fail at `helm template` in that mode. `database.sslmode` joins the values surface as a stated choice. The bundled install keeps `disable`, because that image serves no certificate and the hop never leaves the cluster; an external deployment has to say `require`, `verify-ca`, `verify-full` or `disable` rather than inherit "require" from the code while the chart's comment still describes a hop that is gone.
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.
postgresql.embedded.enabled: falsealready dropped the bundled PostgreSQL StatefulSet, its Service and its ingress NetworkPolicy, but three values kept defaults that only make sense while that server exists:database.hoststill namedsites-postgres;database.runtimeHoststill resolved that Service's in-cluster DNS name for the tenant-facing runtime Secret;SITES_DB_SSLMODEwas hardcodeddisable.Each one renders, applies and rolls out while the control plane dials a Service this render declined to create, so all three now fail at
helm templatein that mode.database.sslmodejoins the values surface as a stated choice. The bundled install keepsdisable, because that image serves no certificate and the hop never leaves the cluster; an external deployment has to sayrequire,verify-ca,verify-fullordisablerather than inheritrequirefrom the code while the chart's comment still describes a hop that is gone.Rebased on the current
main(the newcomer/quickstart batch), so the README test count moves 1060 -> 1063 for the three new tests.Verified
helm lint charts/site- okhelm templatein both modes: 35 -> 32 documents with the bundled server off, and nosites-postgresService/StatefulSet/NetworkPolicy left in the releasetests/test_helm_package.py- three new tests (external replaces the bundled one; the default render is the negative control; all three half-configurations refuse);test_helm_package+test_readme_claims= 34 passingtest_exposure,test_monitoring,test_registry_proxy,test_scale_to_zero,test_cluster_network,test_static_runtimeandtest_builds- one error, environment-only:GatewayQuotaEnforcementTests.setUpClassneeds the throwaway PostgreSQL on 127.0.0.1:55439 (make test-db; no Docker daemon was running on the machine that ran this)