File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed
eng/common/scripts/stress-testing Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -42,5 +42,30 @@ param(
4242
4343. $PSScriptRoot / stress- test-deployment - lib.ps1
4444
45+ # If there are local changes to values.yaml it's almost certain that the user
46+ # is an admin and has provisioned a new stress cluster but not published a
47+ # new addons chart with the new infra config values. In these cases we should
48+ # just fail, as deploying without the local addons override causes misleading
49+ # errors in the cluster with pods not able to mount storage accounts using the
50+ # old values.yaml reference from the published stress-test-addons helm chart.
51+ if (! $LocalAddonsPath ) {
52+ try {
53+ $repoRoot = git - C $PSScriptRoot rev- parse -- show-toplevel 2> $null
54+ } catch {
55+ $repoRoot = $null
56+ }
57+
58+ if ($repoRoot -and (Split-Path $repoRoot - Leaf) -eq " azure-sdk-tools" ) {
59+ $valuesFile = Join-Path $repoRoot " tools/stress-cluster/cluster/kubernetes/stress-test-addons/values.yaml"
60+ if (Test-Path $valuesFile ) {
61+ $valuesStatus = git - C $repoRoot status -- porcelain -- $valuesFile
62+ if ($valuesStatus ) {
63+ $localAddonsDir = Split-Path $valuesFile - Parent
64+ throw " Detected changes to '$valuesFile ' without -LocalAddonsPath. Re-run with '-LocalAddonsPath $localAddonsDir ' to apply local addon values."
65+ }
66+ }
67+ }
68+ }
69+
4570CheckDependencies
4671DeployStressTests @PSBoundParameters
Original file line number Diff line number Diff line change @@ -122,21 +122,21 @@ function DeployStressTests(
122122 if ($clusterGroup -or $subscription ) {
123123 Write-Warning " Overriding cluster group and subscription with defaults for 'pg' environment."
124124 }
125- $clusterGroup = ' rg -stress-cluster-pg'
125+ $clusterGroup = ' SSS3PT_rg -stress-cluster-pg'
126126 $subscription = ' Azure SDK Test Resources - TME'
127127 $tenant = ' 70a036f6-8e4d-4615-bad6-149c02e7720d'
128128 } elseif ($environment -eq ' prod' ) {
129129 if ($clusterGroup -or $subscription ) {
130130 Write-Warning " Overriding cluster group and subscription with defaults for 'prod' environment."
131131 }
132- $clusterGroup = ' rg -stress-cluster-prod'
132+ $clusterGroup = ' SSS3PT_rg -stress-cluster-prod'
133133 $subscription = ' Azure SDK Test Resources - TME'
134134 $tenant = ' 70a036f6-8e4d-4615-bad6-149c02e7720d'
135135 } elseif ($environment -eq ' storage' ) {
136136 if ($clusterGroup -or $subscription ) {
137137 Write-Warning " Overriding cluster group and subscription with defaults for 'storage' environment."
138138 }
139- $clusterGroup = ' rg -stress-cluster-storage'
139+ $clusterGroup = ' SSS3PT_rg -stress-cluster-storage'
140140 $subscription = ' Azure SDK Test Resources - TME'
141141 $tenant = ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
142142 } elseif (! $clusterGroup -or ! $subscription -or $tenant ) {
You can’t perform that action at this time.
0 commit comments