Repository navigation
Deploy posture: network policy, safer chart defaults, rotation runbook - #47
Merged
Merged
Conversation
Phase 4 (final) of the production-hardening audit (2026-08-11): - Chart: opt-in NetworkPolicy template — the metrics listener's documented security model is network scope, and this is the chart-native way to provide it; optional egress lockdown bounds where a pod holding every upstream credential may connect. - Chart: PodDisruptionBudget on by default (docs/deploy.md already claimed it was), rendered only when replicas > 1 so a single-replica deployment's drains are never blocked; default soft topology spread across zones and hosts; automountServiceAccountToken pinned false on the pod as well as the ServiceAccount. - compose: fold/Prometheus/Grafana bind loopback like Redis already did — Grafana runs anonymous-Admin, and "do not put it on a network" now matches what the file does; images reference the release tag instead of mutable :latest. - docs/deploy.md: "Rotating credentials" runbook (env vars are fixed at process start — hot reload does NOT re-read them; per-credential procedures incl. the EMA key's no-overlap caveat; IdP JWKS rollover needs nothing); explicit never-use-/health-as-liveness guidance for non-Helm deploys; --env-file as the primary docker example; the production checklist covers artifact verification, NetworkPolicy, and rotation. - cmd/fold: srv.Close() severs streams that outlive the 10s drain. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Phase 4 (final) of the 2026-08-11 production-hardening audit — deploy posture and runbooks. Closes out findings M7–M10 and L4/L8–L12; with this, every high/medium finding from the audit is remediated.
Chart
networkPolicytemplate (M7): scopes the MCP port, gives the metrics listener the network scope its documented security model assumes, and — withegress.enabled— bounds where a pod holding every upstream credential may connect (DNS + operator-listed rules). Exercised inci/full-values.yaml.docs/deploy.md's checklist already said "PodDisruptionBudget on" while the chart shipped it off with 2 replicas — the exact shape where one node drain takes both pods. Rendered only whenreplicaCount≥ 2 (or autoscaling), so single-replica deployments never get their drains blocked. Default soft topology spread across zones and hostnames (ScheduleAnyway — single-node clusters unaffected; settingtopologySpreadConstraintsreplaces the defaults).automountServiceAccountToken: falseon the pod spec (L10) — the SA already set it; the pod-level pin covers user-supplied ServiceAccounts.redis.urldocumented as password-less-only (L11): the plain value lands verbatim in the Deployment manifest.compose
127.0.0.1like Redis already did (M10) — the file's own "do not put this on a network" comment now matches what it does. Publishing deliberately is a one-line override.:latest(L9); the release flow bumps it.Docs & CLI
kid)./healthas a liveness signal — it 503s when all upstreams are down, and restarting on that kills healthy gateways at the worst moment. TCP for alive,/healthfor ready, timeout above the 5s fan-out budget.--env-fileis the primary docker example (L12), with an accurate note on what it does and doesn't protect against.cmd/fold:srv.Close()severs streams that outlive the 10s drain (L8).Verification
make checkgreen (race, lint 0 issues);make helm-checklints and renders all CI value sets including the new NetworkPolicy/egress/spread fixture; PDB gating verified in both directions (rendered at 2 replicas, skipped at 1); compose validates.Deliberately not included (audit's optional tail, unchanged): opt-in span
enduser.id(L7), cosign onchecksums.txt(L14), a--healthcheckself-probe subcommand (L13).🤖 Generated with Claude Code