Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,30 @@ param(

. $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
DeployStressTests @PSBoundParameters
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,21 @@ function DeployStressTests(
if ($clusterGroup -or $subscription) {
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'
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
} elseif ($environment -eq 'prod') {
if ($clusterGroup -or $subscription) {
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'
$tenant = '70a036f6-8e4d-4615-bad6-149c02e7720d'
} elseif ($environment -eq 'storage') {
if ($clusterGroup -or $subscription) {
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'
$tenant = '72f988bf-86f1-41af-91ab-2d7cd011db47'
} elseif (!$clusterGroup -or !$subscription -or $tenant) {
Expand Down
Loading