feat(chart): add supervisor.extraInitContainers hook (PLT-1553) - #27
Draft
gantipr-gs wants to merge 1 commit into
Draft
gantipr-gs wants to merge 1 commit into
gantipr-gs wants to merge 1 commit into
Conversation
Expose `supervisor.extraInitContainers` on the supervisor Deployment, tpl-rendered in chart scope with the same string-or-list contract as `webapp.extraContainers`. The rendered text goes into a variable first so `initContainers:` is only emitted when something renders. Why: the supervisor makes one connect call to the webapp at boot and exits 1 when it fails; there is no connect-retry or timeout env var. A single- replica webapp that runs migrations at boot therefore turns every node drain into a supervisor CrashLoopBackOff until the webapp is back. The GovSignals umbrella uses this hook to add a wait-for-webapp curl loop. Default `[]` renders byte-identical to before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🧭 Helm Chart Prerelease PublishedVersion: Install: helm upgrade --install trigger \
oci://ghcr.io/govsignals/charts/vendored-upstream-trigger \
--version "4.5.7-plt663.10-pr27.fbb70e0"
|
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
Adds a
supervisor.extraInitContainershook to the supervisor Deployment so init containers can be prepended via values. Accepts a list, or a string that istpl-rendered in chart scope — the same contract aswebapp.extraContainers.Why: the supervisor makes a single connect call to the webapp at boot (
SupervisorSession.start()→httpClient.connect()) and throws when it fails, so the process exits 1 and Kubernetes restarts it with backoff.apps/supervisor/src/env.tsexposes no connect-retry or timeout knob. On FedStart the single-replica webapp runs Prisma + ClickHouse migrations at boot, so a node drain that reschedules both pods leaves the supervisor crash-looping for ~8 minutes (2–5 restarts,TriggerRestartStormpages). The GovSignals umbrella uses this hook to add await-for-webappcurl loop against/healthcheck, which keeps the pod inInit:0/1(no restart counter) until the webapp answers — see GovSignals/govsignals#4844.Default
[]renders byte-identical to before.Changes
templates/supervisor.yaml:tpl-rendersupervisor.extraInitContainersinto a variable, then emitinitContainers:only when the built-ininit-sharedcontainer (bootstrap off) or the rendered extras are non-empty.values.yaml: document + defaultsupervisor.extraInitContainers: [].README.md: "Supervisor init containers" section with the wait-for-webapp example.Chart.yaml: bump4.5.7-plt663.9→4.5.7-plt663.10.Test plan
helm dependency build+ extract +helm lint --values ci/lint-values.yamlpass.gs-v4.4.4(diffedhelm templateoutput).webapp.bootstrap.enabled=falsealone → onlyinit-shared.{{ include "trigger-v4.fullname" . }}/.Values.webapp.service.port→ renders underinitContainers.initContainerskey.init-sharedfirst, then the extra.PLT-1553
🤖 Generated with Claude Code