Skip to content

feat: deploy dogfood by pulled digest instead of CI push - #32253

Merged
deansheather merged 3 commits into
mainfrom
sec-863-image-digest
Nov 16, 2026
Merged

deansheather merged 3 commits into
mainfrom
sec-863-image-digest

Conversation

@deansheather

@deansheather deansheather commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

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.

Design notes and decision log
  • 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.

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.

Adds a coder.image.digest value to the coder and provisioner charts so
deployments can pin the image by digest, and pushes a
main-<commit unix time>-<sha> tag for every main build so Flux image
automation can select the newest build. Part of SEC-863.
@linear-code

linear-code Bot commented Nov 16, 2026

Copy link
Copy Markdown

SEC-863

@deansheather
deansheather temporarily deployed to main November 16, 2026 09:51 — with GitHub Actions Inactive
@deansheather
deansheather temporarily deployed to main November 16, 2026 09:51 — with GitHub Actions Inactive
@deansheather

Copy link
Copy Markdown
Collaborator Author

@codex review

@deansheather

Copy link
Copy Markdown
Collaborator Author

@codex security review

@deansheather
deansheather temporarily deployed to main November 16, 2026 09:51 — with GitHub Actions Inactive
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T09:55:00.276564Z 4d2e5ef Manual request
🔒 Security Review ✅ Completed 2026-11-16T09:54:10.324907Z 4d2e5ef Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4d2e5ef746

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 4d2e5ef746

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@deansheather
deansheather marked this pull request as ready for review November 16, 2026 10:17
@deansheather
deansheather requested a review from a team November 16, 2026 10:17
@deansheather
deansheather temporarily deployed to main November 16, 2026 10:17 — with GitHub Actions Inactive
dogfood.cdr.dev now pulls main builds through Flux image automation in
coder/dogfood, so CI no longer assumes the AWS deploy role, reconciles
Flux, restarts deployments or retags :dogfood. The role's trust is
already disabled, so this job could only fail. Part of SEC-863.
@deansheather
deansheather temporarily deployed to main November 16, 2026 10:19 — with GitHub Actions Inactive
@deansheather deansheather changed the title feat: add coder.image.digest Helm value and sortable main image tags feat: deploy dogfood by pulled digest instead of CI push Nov 16, 2026
@deansheather
deansheather temporarily deployed to main November 16, 2026 10:19 — with GitHub Actions Inactive
@deansheather
deansheather merged commit 368fddf into main Nov 16, 2026
31 of 32 checks passed
@deansheather
deansheather deleted the sec-863-image-digest branch November 16, 2026 10:38
@deansheather
deansheather temporarily deployed to main November 16, 2026 10:38 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
main — 3045a154 Deployed Nov 16, 2026 by deansheather via cla #257839
docs-preview — 3045a154 Deployed Nov 16, 2026 by deansheather via cleanup #109
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants