deploy/azure: mode=vms|aks in main.bicep, HA servers carve-out, AKS germinate profile #139
No reviewers
Labels
No labels
bug
discussion
duplicate
enhancement
goal
help wanted
horizon:backlog
horizon:governance
horizon:mvp
invalid
operator-decision
question
roadmap
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-platform/mitosis!139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "azure-aks-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lands the Azure work that until now lived only as uncommitted files in a local checkout (the AKS azure-pure POC + the 3-node HA expansion, both platforms since torn down — this PR is the surviving artifact).
What's here
deploy/azure/main.bicep— one template,modeas a parametermode=vms(default): the existing bare-VM path, rebased onto current main — the #123/#124 PUBLIC_IP-in-node.env behavior is preserved.mode=aks: managed ground — AKS (workload identity, Cilium network policy, managed Prometheus + Container Insights), ACR, public DNS zone, Key Vault with federated identities (mitosis-cert-manager→ DNS Zone Contributor,mitosis-flux-sops→ KV Crypto User).deploy/azure/servers.bicep— servers-only carve-out for growing a LIVE single-node group to 3-node HA. Exists because runningmain.bicep ha=trueagainst a live group replaces immutablecustomDataand NSG rules. Previously archived only in a plat/mitosis#6 comment; param docs carry the join-token gotcha (joiners present the existing cluster's token, not a fresh GUID).bin/germinate+bin/lib.sh—CLUSTER_PROFILE=aks:trim_gitops_aksstrips k3s-specific organs (monitoring/Grafana → Azure Monitor, node-fabric, registry-node-config, coredns rewrite), repoints the runner image at ACR (az acr buildreplaces docker+ctr side-load), adds a Kyvernoaks-image-redirectmutate policy and extendsrestrict-image-registries. Includes the 8 aks-ground fixes from the POC germination runs. Rebase note: runs after upstream's newstrip_gitops_tenants, before identity rewrite.Runbooks/scripts:
README-aks.md(customer runbook incl. pilot hardening),mirror-images.sh(~25az acr import),entra-forgejo-oidc.sh(Entra ID sign-in for aks-ground Forgejo),aks-cost-experiment.md(62% cost-cut runbook: CNPG PDBs block drains, B-v2 quota 0, nodepool-add CLI crash →az rest).Review notes
mode=vmswas verified to render byte-identical ARM vs the pre-modetemplate at the time of the split; it has since been rebased over #123/#124 and #132 — worth a re-render if touching the vms path.chmod +x deploy/azure/entra-forgejo-oidc.sh deploy/azure/mirror-images.sh. Both are also runnable asbash <script>.🤖 Generated with Claude Code
Pushed
5747ef0to this branch:deploy/azure/README.md— one Azure guide for both modes, written in ASD-STE100 Simplified Technical English (trevato's ask): resources each mode creates, numbered steps,servers.bicepexpansion, Entra sign-in, known limits, parameters/outputs, cost, teardown. It foldsREADME-aks.mdin (removed — one doc, no drift) and links fromdeploy/README.md. Also set the exec bit onmirror-images.sh/entra-forgejo-oidc.shas the PR body asked.Two things I changed in the runbook vs.
README-aks.md— please check them against what you ran:AKS_RG=<rg>—bin/germinate:?-requires it underCLUSTER_PROFILE=aks(it derives subscription + cert-manager client ID from the RG), so the old command would have stopped at the guard.aks-image-redirectcomment inlib.shsays redirected pods ErrImagePull otherwise).Review notes on the rest of the branch (read-only — no
az/bicephere, so no compile; nothing below blocks merge):main.bicep:80/83/346still pin 2×D4ds_v6+ Container Insights + managed Prometheus; your own client-readiness item 7. The experiment landed on 1×D4as_v7, monitoring off (with the 12-disk attach ceiling). Worth deciding the default before merge — the README documents what the template does today.mirror-images.sh:64-66— the "RETRY" branch runs the identical command (only the>/dev/nullis gone), so the comment over-promises; either drop it or make the retry differ. Alsoforgejo:15.0.5-rootless— prod runs 15.0.6; worth re-pinning against the seed vintage you cut from.entra-forgejo-oidc.sh:37reads the Forgejo admin password intoADMIN_PWand never uses it (:54reserved). Least privilege: drop until the REST fallback exists.servers.bicep:97/122—for (idx, j) in serverIndexesnames the itemidxand the indexj; it renders correctly (I traced pip/nic/vm/zones/cloudInit), but the inverted names will trip the next reader.aks-cost-experiment.mdcarries a subscription ID + the customer hostname, and records a torn-down platform — fine on the private forge; flagging in case you'd rather scrub the ID or move it underdocs/.b994d05/3c3d1f4/48f1c4b,de26448/45b8e14/e52a995) — squash-merge as you suggest.If any README wording doesn't match what the aks profile actually does, say so here and I'll fix it.
— Claude (for trevato), via ci-bot
Re-render check you asked for in the PR body — done with
bicep0.39.0 (via nix), head5747ef0:main.bicepandservers.bicepboth compile, 0 errors.main.bicepemits the expected BCP318 "may be null" warnings on theif (mode == …)resources — benign, every access is behind the same condition or a mode ternary.mode=vmsARM is byte-identical tomainfor all five resources (NSG, VNet, public IP, NIC, VM bodies — diffed the compiled JSON per type, ignoring the addedcondition). Only variable change isnodeCountgaining themodeguard; outputs are the same expressions under amodeternary.adminSshPublicKeywas required, now defaults to''(soakscan omit it). Avmsdeploy that forgets the key now fails at VM creation instead of at parameter validation — acceptable, just noting it.bin/lib.shdelta is one self-contained function (trim_gitops_aks, +346/−0);bin/germinatechanges are gated onCLUSTER_PROFILE=aks— default k3s path untouched, and the coldstart gate is green on this head.From my side this is good to squash-merge; the items in my earlier comment are follow-ups, not blockers.
— Claude (for trevato)