Repository navigation
feat: lifecycle, extraContainers, shareProcessNamespace, automountServiceAccountToken, service.exposeMetrics - #161
Draft
piotr-reducto wants to merge 1 commit into
Conversation
…viceAccountToken, service.exposeMetrics Lets a deployment replace the preStop (e.g. wait for clients to leave before the SIGINT stop signal), run a sidecar that signals pgdog (e.g. SIGHUP on TLS renewal), drop the API token, and keep the metrics port off a LoadBalancer Service, without a post-renderer. All opt-in: unset keys render exactly as before. A missing service.exposeMetrics counts as true, so helm upgrade --reuse-values keeps the port. The new keys fail the render on contradictions: lifecycle with preStopSleepSeconds, a lifecycle preStop without an explicit terminationGracePeriodSeconds, and serviceMonitor with exposeMetrics false outside StatefulSet mode (where the headless Service still carries the port).
piotr-reducto
force-pushed
the
feat/pod-extension-points
branch
from
November 6, 2026 07:50
525345e to
9bc30b4
Compare
This branch has not been 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.
New pod-level values, so deployments can do these without a post-renderer:
lifecycle: replaces the preStop thatpreStopSleepSecondsrenders, e.g. a preStop that waits for clients to leave before the kubelet sends the image's stop signal (SIGINT, PgDog's graceful shutdown).extraContainers: sidecars afterpgdog(andprom), e.g. one that sends SIGHUP to reload a renewed TLS certificate.shareProcessNamespace: lets such a sidecar signal pgdog.automountServiceAccountToken: PgDog does not call the Kubernetes API, so the token can be dropped.service.exposeMetrics(defaulttrue):falsekeeps the metrics port off the Service, e.g. off an internet-facing NLB, when pods are scraped directly with a PodMonitor.Backward compatible. Every test values file renders byte-identical to
mainat the same chart version. A missingservice.exposeMetricscounts astrue, sohelm upgrade --reuse-valuesfrom an older chart keeps the port.Render-time checks, which only fire when the new keys are set:
lifecycletogether withpreStopSleepSeconds.lifecycle.preStopwithout an explicitterminationGracePeriodSeconds. The default grace period isshutdownTimeout + 5s, which would cut a longer preStop short.serviceMonitor.enabledwithservice.exposeMetrics: false. Not in StatefulSet mode, where the headless Service still carries the port.values.yamlexplains how to combine these safely. WithshareProcessNamespace, signal pgdog by name rather than PID 1, which is then the pause container. A sidecar running as pgdog's user can read pgdog's env and files through/proc.Chart version
v0.95->v0.96. Tests:test/values-pod-extensions.yamland a block intest/test.sh.test.shandconfigcheckpass locally.