Compare commits

...

1 Commits

Author SHA1 Message Date
Ben Broderick Phillips
714fbccfc0 Migrate stress cluster resource groups 2025-12-04 22:18:36 +00:00
2 changed files with 28 additions and 3 deletions

View File

@ -42,5 +42,30 @@ param(
. $PSScriptRoot/stress-test-deployment-lib.ps1 . $PSScriptRoot/stress-test-deployment-lib.ps1
# If there are local changes to values.yaml it's almost certain that the user
# is an admin and has provisioned a new stress cluster but not published a
# new addons chart with the new infra config values. In these cases we should
# just fail, as deploying without the local addons override causes misleading
# errors in the cluster with pods not able to mount storage accounts using the
# old values.yaml reference from the published stress-test-addons helm chart.
if (!$LocalAddonsPath) {
try {
$repoRoot = git -C $PSScriptRoot rev-parse --show-toplevel 2>$null
} catch {
$repoRoot = $null
}
if ($repoRoot -and (Split-Path $repoRoot -Leaf) -eq "azure-sdk-tools") {
$valuesFile = Join-Path $repoRoot "tools/stress-cluster/cluster/kubernetes/stress-test-addons/values.yaml"
if (Test-Path $valuesFile) {
$valuesStatus = git -C $repoRoot status --porcelain -- $valuesFile
if ($valuesStatus) {
$localAddonsDir = Split-Path $valuesFile -Parent
throw "Detected changes to '$valuesFile' without -LocalAddonsPath. Re-run with '-LocalAddonsPath $localAddonsDir' to apply local addon values."
}
}
}
}
CheckDependencies CheckDependencies
DeployStressTests @PSBoundParameters DeployStressTests @PSBoundParameters

View File

@ -122,21 +122,21 @@ function DeployStressTests(
if ($clusterGroup -or $subscription) { if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'pg' environment." Write-Warning "Overriding cluster group and subscription with defaults for 'pg' environment."
} }
$clusterGroup = 'rg-stress-cluster-pg' $clusterGroup = 'SSS3PT_rg-stress-cluster-pg'
$subscription = 'Azure SDK Test Resources - TME' $subscription = 'Azure SDK Test Resources - TME'
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d' $tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
} elseif ($environment -eq 'prod') { } elseif ($environment -eq 'prod') {
if ($clusterGroup -or $subscription) { if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'prod' environment." Write-Warning "Overriding cluster group and subscription with defaults for 'prod' environment."
} }
$clusterGroup = 'rg-stress-cluster-prod' $clusterGroup = 'SSS3PT_rg-stress-cluster-prod'
$subscription = 'Azure SDK Test Resources - TME' $subscription = 'Azure SDK Test Resources - TME'
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d' $tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
} elseif ($environment -eq 'storage') { } elseif ($environment -eq 'storage') {
if ($clusterGroup -or $subscription) { if ($clusterGroup -or $subscription) {
Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment." Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment."
} }
$clusterGroup = 'rg-stress-cluster-storage' $clusterGroup = 'SSS3PT_rg-stress-cluster-storage'
$subscription = 'Azure SDK Test Resources - TME' $subscription = 'Azure SDK Test Resources - TME'
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47' $tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
} elseif (!$clusterGroup -or !$subscription -or $tenant) { } elseif (!$clusterGroup -or !$subscription -or $tenant) {