feat(cd): dispatch digest-pinned state updates to PostHog/charts after each release build - #87
Merged
Merged
Conversation
Adds the state-file CD step to the existing release workflow (no second image pipeline): after the multi-arch image push, record the manifest digest and dispatch commit_state_update to PostHog/charts so state/viaduck.yaml pins <commit>@sha256:<digest> and ArgoCD rolls it with prod-approval gating. Mutable :latest/:dev/:prod tags are kept for back-compat until the charts-side cutover lands. Also tags the image with the commit SHA for digest inspection and traceability, and guards the job to the canonical repo. Requires GH_APP_CHARTS_DEPLOYER_APP_ID / GH_APP_CHARTS_DEPLOYER_PRIVATE_KEY secrets (not yet present in this repo). Co-authored-by: Shelley <shelley@exe.dev>
Collaborator
|
Same review as millpond#136 — mechanics sound (fork guard, pinned actions, immutable
|
Member
Author
|
Heads-up: the post-merge release build (run 33819793873) built and pushed the image fine, but the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Viaduck deploys to the managed-warehouse clusters from the mutable
:prod/:devtags withpullPolicy: Alwaysand an auto-restart CronJob. Anyone who can retag the GHCR package ships code to production within ~10 minutes with no PR, no approval, and no recorded provenance — into a service that writes every tenant duckling bucket and holds every destination Postgres password. A security review flagged this as a High finding.This PR onboards viaduck to the standard state-file digest-pin pipeline (like duckgres): after each release build, the workflow records
<commit>@sha256:<digest>instate/viaduck.yamlviacommit_state_updaterepository-dispatch. ArgoCD rolls the pinned digest with prod-approval gating.Changes
release.yaml:github.repository == 'PostHog/viaduck'guard; push a:<commit-sha>tag; compute the manifest digest; dispatchcommit_state_updatewithrelease: "viaduck"to PostHog/charts.:latest/:dev/:prodkeep flowing until the charts-side cutover PR lands. The promote-to-dev/prod retag workflows become deploy no-ops after cutover and can be retired in a follow-up.Prerequisites
GH_APP_CHARTS_DEPLOYER_APP_ID/GH_APP_CHARTS_DEPLOYER_PRIVATE_KEYsecrets must exist in this repo (or org) — same app as duckgres uses.gh secret listshows neither; needs an org admin if not org-level.Testing
state/viaduck.yamlcommit bumpingimage.sha.Rollback
state/viaduck.yaml.