Repository navigation
feat: deploy dogfood by pulled digest instead of CI push - #32253
Conversation
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.
|
@codex review |
|
@codex security review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
Switches dogfood from push-based deploys to pull-based, digest-pinned deploys with Flux image automation (SEC-863):
deploy.yamlandscripts/should_deploy.sh, and drops thedeployjob frombuild.yaml. CI no longer assumes the AWS deploy role, fetches EKS credentials, runsflux reconcileorkubectl rollout restart, or retags:dogfood, which nothing consumes.build.yamlnow has no cluster access, and only the signing job's existingid-token: writeremains.coder.image.digestin thecoder,provisionerandai-gatewaycharts. When set, the image renders asrepo:tag@digest. Empty (the default) keeps today's output, and existing golden files are unchanged.build.yamlpushes an extramain-<commit unix time>-<12 char sha>tag for every main build, which the FluxImagePolicyorders on. Theprunejob 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
digestvalue would fail on the current chart.Merging this before dogfood#857 doesn't regress anything. The
dogfood-coder-repo-cirole'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
Receiverwithout giving CI cluster credentials.tag: x@sha256:.... Flux's:tagand:digestsetters write separate fields, and no setter writestag@digestinto a single field. A dedicated chart value is the documented Flux pattern for HelmReleases and is useful to customers who pin by digest.git log -1 --format=%ctmakes the tag sort by commit time, which Flux'snumericalpolicy selects on. The sha suffix keeps tags unique and traceable.continue-on-error. Admission-time signature verification is a separate SEC-863 step.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 asghcr.io/coder/coder-preview:<tag>@sha256:<digest>.Refs SEC-863