Repository navigation
gfs-postgres offers TLS on every start - #188
Open
medazizktata25 wants to merge 4 commits into
Open
medazizktata25 wants to merge 4 commits into
medazizktata25 wants to merge 4 commits into
Conversation
The entrypoint starts Postgres with ssl=on and a mounted cert pair, or a per-container self-signed one, so clients can use sslmode=require. TLS is offered rather than forced: kube-proxy SNATs NodePort traffic, so pg_hba cannot tell internet clients from in-cluster ones. Extracted unchanged from a larger branch about in-pod lazy-clone bootstrap, which it does not depend on and which should not gate it.
medazizktata25
had a problem deploying
to
pr-validation
October 9, 2026 12:40 — with
GitHub Actions
Error
medazizktata25
had a problem deploying
to
pr-validation
October 9, 2026 12:40 — with
GitHub Actions
Error
medazizktata25
had a problem deploying
to
pr-validation
October 9, 2026 12:40 — with
GitHub Actions
Error
Conflict in crates/extensions/gfs/Dockerfile with 59e3244 (Guepard-Corp#184), which appended LABEL run.guepard.gfs.pg_major at the same spot this branch appended the TLS entrypoint. The two are independent; both are kept, the label first, then COPY gfs-tls-entrypoint.sh / ENTRYPOINT / CMD.
medazizktata25
had a problem deploying
to
pr-validation
October 16, 2026 16:04 — with
GitHub Actions
Failure
medazizktata25
had a problem deploying
to
pr-validation
October 16, 2026 16:04 — with
GitHub Actions
Failure
medazizktata25
requested a deployment
to
pr-validation
October 27, 2026 16:54 — with
GitHub Actions
Waiting
medazizktata25
requested a deployment
to
pr-validation
October 27, 2026 16:54 — with
GitHub Actions
Waiting
medazizktata25
requested a deployment
to
pr-validation
October 27, 2026 16:54 — with
GitHub Actions
Waiting
This branch is waiting to be deployed
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.
Extracted unchanged from a larger branch about bootstrapping the lazy clone in-pod over loopback. The TLS change does not depend on any of that work and should not wait for it. Authored by khalil tbini; I cherry-picked it, so the author is preserved and the diff is byte-identical to the original commit's.
What it does
A wrapper entrypoint starts Postgres with
ssl=onand either a mounted cert pair (GFS_TLS_CERT_FILE/GFS_TLS_KEY_FILE, defaulting to/etc/gfs-tls/tls.{crt,key}) or a per-container self-signed pair, thenexecs the stockdocker-entrypoint.sh. Clients can then usesslmode=require.TLS is offered, not forced, and the script says why: kube-proxy SNATs NodePort traffic, so
pg_hbacannot distinguish an internet client from an in-cluster one. Encryption is enforced on the client side, through the connection string.No private key is baked into the image — the self-signed pair is generated per container, so there is no shared key across deployments.
Verified against the built image
Built from this branch and exercised directly, not reasoned about:
Default start, self-signed
A mounted pair must win over the self-signed one — mounted a throwaway cert with
CN=mounted-wins:Other commands must pass through, not be swallowed by the wrapper
The script also parses cleanly under
dash, which is/bin/shon the Debian base — worth checking separately because it is written forsh, not bash, and runs underset -eu.What is NOT verified
docker run. The NodePort/SNAT reasoning in the script's comment is the stated rationale for offering rather than forcing TLS, and I did not exercise it on a cluster.sslmode=verify-fullagainst a real CA-issued wildcard. The mounted-cert path is verified to take effect; whether a given CA chain satisfies a verifying client is a deployment question.id -ufor both the certificate directory and thechown, and the image runs as root here, so that branch was not taken. I checked separately that the[ "$(id -u)" = 0 ] && chown ...line does not abort the script underset -eon dash — it does not, so the non-root path should reach theexec— but it is untested on an actual non-root start.