Skip to content

feat(helm): postgres control-plane profile — ADR 0010 slice 6 (E4)#149

Merged
brownjuly2003-code merged 1 commit into
mainfrom
feat/e4-helm-postgres-slice6
Jul 4, 2026
Merged

feat(helm): postgres control-plane profile — ADR 0010 slice 6 (E4)#149
brownjuly2003-code merged 1 commit into
mainfrom
feat/e4-helm-postgres-slice6

Conversation

@brownjuly2003-code

Copy link
Copy Markdown
Owner

What

E4 / ADR 0010 rollout slice 6 — the Helm half of the control-plane
externalization. The app-side PostgresControlPlaneStore shipped in slice 5;
this releases the render-gate ratchet so the chart can express the multi-replica
scale profile.

Changes

  • values.schema.jsoncontrolPlane.store enum ["embedded"]
    ["embedded", "postgres"]; new controlPlane.postgres.{existingSecret,dsnKey}
    (DSN sourced from an operator secret, mirroring the ClickHouse password — never
    inlined).
  • values.yamlcontrolPlane.postgres defaults + updated gate comment.
  • templates/deployment.yaml — wire AGENTFLOW_CONTROLPLANE_STORE (always,
    self-documenting) + AGENTFLOW_CONTROLPLANE_PG_DSN from a secretKeyRef when
    store=postgres, with required() on existingSecret (fail-closed; no silent
    embedded fallback).
  • tests — ratchet test updated for the extended enum; new render tests for
    the postgres env/DSN wiring, gate release for multi-replica + HPA, missing-DSN
    failure, and the still-gated duckdb-backend case.
  • k8s/staging/values-staging-scale.yaml.example — ready scale overlay
    (replicaCount=2, clickhouse + postgres) layered on values-staging.yaml.
  • scripts/k8s_replica_correctness_verify.sh — automates the pod-count +
    cross-pod registration-visibility checks (Phase 3). bash -n only.
  • docs — cutover-plan Phase 3 checkboxes + verify recipe, helm-deployment
    scale section, ADR 0010 rollout item 6 execution note.

Verification

  • helm template (6 profiles) + helm lint (base + scale overlay) — clean.
  • tests/unit/test_helm_values_contract.py — 18 passed.
  • Full unit suite — 1626 passed; ruff check (src/tests/scripts) + ruff format --check clean. (mypy CI scope is src/ only — no src/ touched.)

Deferred (Mac/CI tail)

The two-real-pods live run — kind at replicaCount=2 plus the ADR 0010
replica-correctness checks (exactly-one delivery per (webhook,event), one alert
page per incident, cross-pod registration visibility) — needs Docker/kind,
unavailable on the authoring host. Its store-level guarantee is already
live-verified by slice 5's 31/31 standalone-PostgreSQL probes; Phase 3 adds only
the topology proof. Recipe + overlay + verify script are in this PR.

🤖 Generated with Claude Code

Release the render-gate ratchet so the chart can express the multi-replica
scale profile. The app-side PostgresControlPlaneStore shipped in slice 5;
this wires the chart half.

- values.schema.json: controlPlane.store enum embedded → [embedded, postgres];
  new controlPlane.postgres.{existingSecret,dsnKey} (DSN via operator secret,
  mirroring the ClickHouse password — never inlined).
- values.yaml: controlPlane.postgres defaults + updated gate comment.
- deployment.yaml: wire AGENTFLOW_CONTROLPLANE_STORE (always, self-documenting)
  + AGENTFLOW_CONTROLPLANE_PG_DSN from secretKeyRef when store=postgres, with a
  required() on existingSecret (fail-closed, no silent embedded fallback).
- tests: ratchet test updated for the extended enum; new render tests cover the
  postgres env/DSN wiring, gate release for multi-replica + HPA, missing-DSN
  failure, and the still-gated duckdb-backend case.
- k8s/staging/values-staging-scale.yaml.example: ready scale overlay
  (replicaCount=2, clickhouse + postgres) layered on values-staging.yaml.
- scripts/k8s_replica_correctness_verify.sh: automates the pod-count + cross-pod
  registration-visibility checks (Phase 3); bash -n only (Docker/kind unavailable
  on the authoring host).
- docs: cutover-plan Phase 3 checkboxes + verify recipe, helm-deployment scale
  section, ADR 0010 rollout item 6 execution note.

Render side verified: helm template/lint (6 cases), test_helm_values_contract.py
(18 passed), full unit suite 1626 passed, ruff/format clean. The two-real-pods
live run (kind replicaCount=2 + exactly-one-delivery / one-page-per-incident /
cross-pod visibility) is the deferred Mac/CI tail; its store-level guarantee is
already live-verified by slice 5's 31/31 standalone-PG probes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

DORA Metrics

  • Window: last 30 days
  • Branch: main
  • Deployment frequency: 125 total / 29.17 per week
  • Lead time for changes: avg 0.42h / median 0.0h
  • Change failure rate: 75.2% (94/125)
  • MTTR: 0.29h across 2 incident(s)

@brownjuly2003-code brownjuly2003-code merged commit b60d94f into main Jul 4, 2026
19 checks passed
@brownjuly2003-code brownjuly2003-code deleted the feat/e4-helm-postgres-slice6 branch July 4, 2026 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants