Add main→dev0 AKS continuous deploy (OIDC, digest roll) - #8
Draft
cookieofcode wants to merge 5 commits into
Draft
cookieofcode wants to merge 5 commits into
cookieofcode wants to merge 5 commits into
Conversation
Every push to main builds a GHCR image by digest and rolls Deployment/torqvoice on aks-torqvoice-dev0. Terraform ignores the live container image so infra apply cannot revert CD. Auth is Entra federation only; RBAC is namespace-scoped, not Cluster Admin. Co-authored-by: Severin Pereto <cookieofcode@gmail.com>
Pin deploy-dev0 Actions by commit SHA, drop the job environment so the OIDC subject stays repo:cookieofcode/torqvoice:ref:refs/heads/main, and document the exact-subject allow-list, no-SP-secret rule, namespace-scoped RBAC, and an optional Environment reviewer gate. Co-authored-by: Severin Pereto <cookieofcode@gmail.com>
Leo confirmed no write access to ghcr.io/torqvoice/torqvoice. Keep the upstream digest as a temporary first-apply pin only; CD push/pull source of truth is ghcr.io/cookieofcode/torqvoice via GITHUB_TOKEN. Prefer a public package; ESO pull-secret if it stays private. No ACR. Co-authored-by: Severin Pereto <cookieofcode@gmail.com>
cursor
Bot
force-pushed
the
cursor/dev0-aks-cd-1409
branch
from
September 16, 2026 07:06
58d58a2 to
f38dac4
Compare
PRs that touch .github/workflows now run actionlint 1.7.12 (syntax) and assert SHA pins on deploy-dev0.yml. Path filters live in a Paths job so a required Actionlint status is green on app-only PRs. No deploy, no apply, no Azure secrets. Co-authored-by: Severin Pereto <cookieofcode@gmail.com>
|
CD-seam check is now green on this head.
The remaining red check is Playwright shard 3 of 4 in |
…load test The forged-URL test registered a fresh page.route handler inside the loop but unroute was called after the iteration, and a previous handler could still be active when the next file input triggered the same route. This caused route.fulfill to throw 'Route is already handled!' on shard 3. Move the Documents panel open into a one-time setup, define a named handler per iteration, and unroute it in a finally block before the next forged URL is attempted. Security assertions are unchanged. Co-authored-by: Severin Pereto <cookieofcode@gmail.com>
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
Every push to
mainbuilds the app image, pushes it to this repo’s GHCR package by digest (ghcr.io/cookieofcode/torqvoice), and rollsDeployment/torqvoicein namespacetorqvoiceon dev0 AKS.This is app CD, not
terraform apply. Hetzner staging/prod compose workflows are unchanged (they still pull upstream). Prod AKS is not a target. We do not push toghcr.io/torqvoice/torqvoice(no write access; confirmed).Quality: CD seam (this update)
Quality blocked this draft on workflow lint, not on infra. Terraform already ran on this head (not skip) after PR #13 landed on
main. This update adds the missing PR check:deploy-dev0.ymlterraform applymain.linux_amd64checksum8aca8db9…). No curl ofactionlint@main..github/workflows/deploy-dev0.yml).azure/login. No GHCR push. No AKS roll..github/actionlint.yaml;deploy-dev0.ymland this lint workflow still get shellcheck.Why
Product rule: any version on
mainmust run ondev0. Infra apply stays Leo-gated; the next apply must not revert the image CD just rolled. Security stamps OIDC/RBAC before merge.Image store (cookieofcode GHCR only)
ghcr.io/cookieofcode/torqvoiceviaGITHUB_TOKEN+packages:write(IMAGE_NAME: ${{ github.repository }})terraform applycan create pods before this fork’s package exists. CD replaces it. We never push there.k8s/image-pull-secret.yaml.example). No Azure ACR.docker-publishis tag-only). First[Dev0] Deployonmaincreates it.What landed
.github/workflows/deploy-dev0.yml— GitHub-hosted runner;azure/loginOIDC only; alluses:pinned by commit SHA; deploy by digest; rollback on failed roll. Stillon: pushtomainonly..github/workflows/actionlint.yml— PR check; skip vs run; actionlint 1.7.12 + SHA-pin assertion ondeploy-dev0.yml..github/actionlint.yaml— Hetzner runner label; ignore pre-existing compose/rollback shellcheck.kubernetes.tf—lifecycle.ignore_changeson the container image;maxSurge=0for the RWO PVC.identity.tf— optional namespace-scoped CD RBAC (not Owner/Contributor/Cluster Admin).infra/azure/README.md— CD vs apply, Security stamp, cookieofcode GHCR as sole write target, public vs pull-secret.deploy-staging.yml/deploy-prod.ymlnot changed.Security stamp (OIDC / RBAC)
repo:cookieofcode/torqvoice:ref:refs/heads/mainonly. Job has noenvironment:.AZURE_*are GUIDs.uses:indeploy-dev0.yml(CI asserts this).torqvoiceRBAC Writer.Human setup before the first live roll (not this merge)
ghcr.io/cookieofcode/torqvoice— set that package Public (or ESOghcr-pullif it must stay private).Team + Security verify; do not merge until Leo.
FinOps (cost-only)
Verdict
Acceptable (lean) — no new always-on Azure SKUs; spend is GitHub Actions minutes. No ACR. Actionlint downloads a ~2MB binary only when
.github/workflows/**changes.Ballpark
mainpush, GHCR pull egress, a few extra minutes on workflow-touching PRs.Blockers
none
Should-fix
rg-torqvoice-dev0(and tfstate RG) before any approved apply — unchanged recommendation.Nice-to-have
Risks
maxSurge=0is the accepted single-node + RWO downtime trade.