Files
Dean Sheather 368fddf1d6 feat: deploy dogfood by pulled digest instead of CI push (#32253)
Switches dogfood from push-based deploys to pull-based, digest-pinned
deploys with Flux image automation (SEC-863):

- **Remove the push deploy.** Deletes `deploy.yaml` and
`scripts/should_deploy.sh`, and drops the `deploy` job from
`build.yaml`. CI no longer assumes the AWS deploy role, fetches EKS
credentials, runs `flux reconcile` or `kubectl rollout restart`, or
retags `:dogfood`, which nothing consumes. `build.yaml` now has no
cluster access, and only the signing job's existing `id-token: write`
remains.
- **`coder.image.digest`** in the `coder`, `provisioner` and
`ai-gateway` charts. When set, the image renders as `repo:tag@digest`.
Empty (the default) keeps today's output, and existing golden files are
unchanged.
- **Sortable main tag.** `build.yaml` pushes an extra `main-<commit unix
time>-<12 char sha>` tag for every main build, which the Flux
`ImagePolicy` orders on. The `prune` job already prunes `^main-` tags
older than 30 days.

Companion PR: coder/dogfood#857, which installs the image controllers
and pins dogfood-cdr by digest. **Merge this one first**: the ai-gateway
chart's schema rejects unknown keys, so dogfood's new `digest` value
would fail on the current chart.

Merging this before dogfood#857 doesn't regress anything. The
`dogfood-coder-repo-ci` role's trust was disabled during containment, so
the deploy job currently fails at OIDC role assumption on every main
build and only sends a failure alert to Slack. Until dogfood#857 is
live, dogfood stays on its current image.

<details>
<summary>Design notes and decision log</summary>

- **Delete the deploy instead of keeping a Flux webhook ping.** A ping
would only cut latency. Flux scans the registry every 2m, so any trigger
can be added later as a notification-controller `Receiver` without
giving CI cluster credentials.
- **Separate digest value instead of `tag: x@sha256:...`.** Flux's
`:tag` and `:digest` setters write separate fields, and no setter writes
`tag@digest` into a single field. A dedicated chart value is the
documented Flux pattern for HelmReleases and is useful to customers who
pin by digest.
- **Commit timestamp in the tag.** `git log -1 --format=%ct` makes the
tag sort by commit time, which Flux's `numerical` policy selects on. The
sha suffix keeps tags unique and traceable.
- **Not done here:**
- Making the cosign and GitHub attestation steps required. They're still
`continue-on-error`. Admission-time signature verification is a separate
SEC-863 step.
- Removing the AWS role itself and the `AWS_DOGFOOD_*` repo variables.
Those are settings outside the repo, and they become unused once this
merges.

</details>

Verified: `go test ./helm/...`, `make lint/helm`, `make lint/actions`. I
also rendered the dogfood-cdr values against this branch's charts, and
the server, provisioner and ai-gateway images all come out as
`ghcr.io/coder/coder-preview:<tag>@sha256:<digest>`.

Refs SEC-863

> Generated by Coder Agents on behalf of @deansheather.
2026-11-16 21:38:23 +11:00
..