Skip to content

Prod deploy path #556

Closed
Closed

Description

@athvin

Open work found in plan-to-aws.md §3.5 (now .claude/skills/infra-platform/references/plan-to-aws.md) · release mvp · estimate 1.5 eng-weeks

Unattended apply-on-main exists for dev. Prod needs its own path.

Revised 2026-11-07: the Terraform half of the prod path is built, and this issue's "not built" claim is stale. The §14.2 prod hop exists: envs/prod applies under er-ci-tf-apply-prod, chained into from er-ci-tf-apply, which is denied the prod state object so the hop cannot stop being used (.github/workflows/infra.yml:40-44 and :489-491; infrastructure.md §14.2 records the hop as "now built"). drift.yml covers envs/prod. The original citation — "parity-roadmap notes two things not built, including §14.2's chained prod-scoped apply role" — is wrong twice over: the role is built, and parity-roadmap.md no longer exists in the tree.

What remains:

How this was verified

Originally: "parity-roadmap notes two things not built, including §14.2's chained prod-scoped apply role." Re-verified 2026-11-07 against origin/main: the hop and its deny are in the workflow and the module tree as cited above.


Coverage, sizing and status were verified against this repo on 2026-11-05, not taken from the doc's checkbox. Estimate revised 2.0 → 1.5 eng-weeks on 2026-11-07: the identity path is done; the deploy path and its acceptance runs are not.

Activity

  1. added
    mvp
    docs-backlog
    on Nov 5, 2026
  2. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Two items land on this ticket from the prod edge (#555, PRs #911 / #913 / #919), which is now applied and live.

    What #556 inherits

    1. The TargetGroupBinding. The edge exists and has nothing behind it — https://dupezero.com serves a valid certificate and returns 503, because the target group has no targets. Terraform owns the load balancer and exports what you need:

    edge_target_group_arn   # er-prod-web, target_type = ip, port 3000, health check /api/healthz
    

    er-prod has the CRD as eks.amazonaws.com/v1 (Auto Mode's own load-balancing controller, not the upstream elbv2.k8s.aws group) — verified against the cluster. There is no IngressClass on er-prod and none is needed: the chart's ingress-web.yaml stays off in prod, since it was written for dev-over-Tailscale with scheme: internal.

    Both halves of the ALB→pod network path are already in Terraform (edge.tf): the ALB security group egresses to the VPC CIDR on 3000, and the EKS-managed node security group accepts 3000 from the ALB's group. That second rule is the one worth knowing about — with target_type = ip the targets are pod addresses, and a pod IP is a secondary address on a node ENI, so without it the targets health-check unhealthy with nothing naming the cause.

    2. The second half of #555's acceptance probe, and the apex TTL.

    The blocking half of the WAF criterion is done and recorded on #911: 60 POSTs to /api/auth/login → 60× 403, with 5 GETs to / from the same address at the same moment → 5× 503, proving the block is path-scoped rather than IP-wide. What is not done is "a second IP's legitimate login succeeds", because a successful login needs pods. That belongs here.

    Also inherited: cloudflare_dns_record.apex and .www are on a 60-second TTL, deliberately, so a mistake is correctable in a minute rather than cached for an hour while the edge is still being built. Raise it once pods are serving and the edge has been stable for a day or so.

    Prerequisite

    #906 first — modules/eks sets node_pools = ["system"], so Auto Mode's general-purpose pool is not enabled and er-prod has no NodePool an app pod can land on. A deploy would sit Pending.

    Added acceptance items

    • a TargetGroupBinding joins the er-web Service to edge_target_group_arn, and the target group reports healthy targets
    • https://dupezero.com serves the app rather than 503
    • Prod edge #555's remaining half: a second address completes a real login while the first is rate-limited
    • the apex and www TTLs raised from 60s
  3. self-assigned this
    on Nov 8, 2026
  4. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Claimed — working in #928 (draft). Closing that PR releases the claim. Plan: PR-A (Terraform identity: prod ci-deploy role + EKS access entry + /app EFS access point) lands first as its own PR so the role exists before any workflow uses it — the dev precedent; this PR then adds the chart TargetGroupBinding (eks.amazonaws.com/v1) and the prod leg in deploy.yml.

  5. athvin commented on Nov 8, 2026

    @athvin
    OwnerAuthor

    Landed and verified live on 2026-11-08. The path: #930 (identity — role, access entry, /app EFS access point, applied by infra run 42531622702) then #928 (chart TargetGroupBinding + deploy-prod leg), squash-merged as ff5b416a and b5f2cbab.

    Acceptance, each with its evidence:

    §3.5's three cases, all exercised:

    • a deploy referencing a tag is refused — deploy-inactive-colour.sh fed NEW_API=latest exits 1: "refusing to deploy 'latest' — §14.2 deploys reference an image by sha256 digest, never a tag".
    • a digest not yet replicated blocks — in this single-registry build the honest reading is the staleness refuse: deploy-resolve-digests.sh with DEPLOY_SHA=db7ccc5e exits 1, "er-web would ship older code than db7ccc5", naming the fix command.
    • the replicated digest deploys — deploy run 42532909229, both legs green on digests sha256:ac079b… (er-api) / sha256:409b24… (er-web).

    §17 Phase 0 SCP probes re-run against the now-existing prod lake (er-prod-lake-797781631727, profiles er-platform / er-prodadmin): read path intact (list-objects-v2 succeeds, empty lake); put-object under PlatformAdmin → explicit deny ✓; iam:CreateRole er-prod-app-probe under PlatformAdmin → explicit deny ✓; the same create+delete under ProdAdmin succeeds — the exemption works ✓.

    What the first deploy caught: er-prod had no ESO controller — it was hand-installed on er-dev in task 1.6 and never captured, so the release's pre-install hooks failed with no matches for kind "ExternalSecret". Hand-installed ESO 2.12.0 + the ClusterSecretStore on er-prod (store validates Ready, Pod Identity auth confirmed) to unblock, and the permanent fix rides in #931: scripts/cluster_objects.sh now installs pinned ESO and the store on both clusters, with the workflow carrying it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docs-backlogmvp

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions