fix(cli): harden Azure deployment safety - #531
fix(cli): harden Azure deployment safety#531Pal Lakatos-Toth (pallakatos) wants to merge 6 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import { describe, expect, it, vi } from "vitest"; |
| ]; | ||
| }; | ||
|
|
||
| const azureDataWithUnavailableSystem = ( |
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import { describe, expect, it, vi } from "vitest"; |
| ]; | ||
| }; | ||
|
|
||
| const azureDataWithUnavailableSystem = ( |
|
The full CI/security matrix is now green on Jess (@appliedi), if you have a disposable non-production subscription with git clone https://github.com/Azure/kars.git
cd kars
git fetch origin pull/531/head:pr-531
git switch pr-531
cd cli
npm ci
npm run build
node dist/index.js --versionFor a combined fresh-deployment check in West US 3: node dist/index.js up \
--name deployment-safety-test \
--region westus3 \
--release v0.1.26 \
--rollback-on-failure \
--yesPlease use only disposable resources. The CLI prints the generated resource group, subscription, selected Kubernetes version, computed node footprint, and rollback lease. If the deployment succeeds, remove it afterward with the exact generated values: node dist/index.js destroy --all --yes \
--resource-group <generated-rg> \
--subscription <subscription-id> \
--region westus3Please report the selected AKS version/node count, whether ACR and RBAC deployment completed, whether rollback/cleanup completed on any failure, and any unexpected behavior here on #531. Redact subscription IDs, tenant IDs, resource names, and credentials from logs. Findings on any of #515–#518 can be centralized in this PR so we can fix them before merge. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Preserve custom node resource groups for existing AKS clusters while retaining fail-fast validation for dry runs and newly created clusters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ee78c86b-0001-4d24-b829-7c75b59c9316
|
CI is now fully green on Jess (@appliedi), the branch-testing instructions above are now unpaused and refer to the current PR head. Please fetch |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb3654cd-f1e0-445a-8734-430800af1903
Summary
trustPolicy1.33version with regionalKubernetesOfficialdiscovery and validation for new clustersavailability, total/family vCPU quota, and retained resource existence before
billable deployment work
reuse-only unless operators use dedicated AKS upgrade/pool workflows
rollback guarded by Azure
CanNotDeletemanagement locksup,add,upgrade, fast upgrade,Agent ID setup, image acquisition, sandbox bring-up, and destroy
expired
Backward compatibility
--rollback-on-failureis explicitly requestedpreserved
full managed-cluster Bicep template
plans, and upgrade policies are not silently changed
to supported AKS workflows
on missing or ambiguous targets
Validation
0.44.1build and lint passedtrustPolicyor hardcoded1.331.36.3and calculated theexpected 8-vCPU one-sandbox footprint
resolved successfully
soft-deleted vault
security-audit, E2E, chaos, benchmark, Bicep, dependency, secret, CodeQL,
Trivy, and container gates
Draft blocker
The disposable full deployment passed account, naming, quota, provider, and ARM
validation and reached AKS/RBAC creation. It then failed because the available
subscriptions deny:
All disposable resource groups were deleted. A purge-protected test Key Vault
tombstone remains recoverable until its scheduled purge.
Before marking this PR ready:
Microsoft.Authorization/roleAssignments/writekars uppathFixes #515
Fixes #516
Fixes #517
Fixes #518