feat(fleet): replace mgmt-cluster Bicep with aks-cluster-create Go tool #6856
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 566 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6856"
general
weight: 0.35
bennerv
Summary
Move management-cluster provisioning from Bicep into a Go tool as the first step toward environment-derived node pool management. This stage uses static
config.yamlmgmt.aks.{systemAgentPool,userAgentPool,infraAgentPool}configuration and shares the resource-modeling code with fleet controllers. ARM still handles resource dependencies and long-running operations, rather than the tool independently polling every pool.Tracking: this PR serves as the implementation and review record for the static-configuration stage; no separate tracking ticket is linked. Follow-up PRs will add desired-state allocation (PR2) and the day-2 node pool reconciliation controller (PR3).
Provisioning behavior
dev-infrastructure/scripts/aks-cluster-createbuilds the template from SDK cluster and agent-pool specifications. The bootstrap system pool is inline only for initial cluster creation; configured child pools are deployed declaratively. Unconfigured pools are left untouched, and Kubernetes versions are omitted on updates to avoid implicit upgrades.aks-cluster-createdeployment name, wait for previous deployment and cluster operations, then observe live configuration before building a fresh template. A previous successful deployment does not replace the live drift check. Log the previous Azure deployment error before recovering Failed/Canceled work.aro-hcp-provisioning. Deployment success is the handover barrier: refresh the cluster and its ETag, then conditionally remove the marker while applying configured tags and preserving external tags. Failed deployments leave the marker intact; finalization does not independently poll every pool.Shared packages and pipeline changes
fleet/pkg/computeandfleet/pkg/azure/{skucache,agentpools,agentpoolspec}. Adapt the capacity reporting controller to these packages andarmcontainerservicev8, and align affected module dependencies.dev-infrastructure/mgmt-pipeline.yamlpre-builds the binary and runscluster-createas a Shell step betweeninfraandcluster.mgmt-cluster.biceptomgmt-infra.bicepso they exist before the tool runs. Keepmgmt-cluster.bicepfor post-cluster wiring and extract ACR pull, workload identity, and maintenance configuration intoaks-cluster-post.bicep.Test plan
Verified locally for the updated AKS tool:
cd dev-infrastructure/scripts/aks-cluster-create && GOWORK=off go test -race ./...cd dev-infrastructure/scripts/aks-cluster-create && GOWORK=off go build -o aks-cluster-create .Broader validation remains to be completed or confirmed for this revision:
go test ./fleet/pkg/azure/... ./fleet/pkg/compute/... ./fleet/pkg/controllers/capacityreporting/...make validate-config-pipelinesmake verify-materializeaftercd config && make materialize