Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 8278 (#29790)
Browse files Browse the repository at this point in the history
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#8278 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
azure-sdk and benbp authored May 23, 2024
1 parent 11da215 commit 9d9f047
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,17 @@ function DeployStressPackage(
$imageTagBase += "/$($pkg.Namespace)/$($pkg.ReleaseName)"

if (!$Template) {
Write-Host "Creating namespace $($pkg.Namespace) if it does not exist..."
kubectl create namespace $pkg.Namespace --dry-run=client -o yaml | kubectl apply -f -
if ($LASTEXITCODE) {exit $LASTEXITCODE}
Write-Host "Checking for namespace $($pkg.Namespace)"
kubectl get namespace $pkg.Namespace
if ($LASTEXITCODE) {
Write-Host "Creating namespace $($pkg.Namespace) ..."
kubectl create namespace $pkg.Namespace --dry-run=client -o yaml | kubectl apply -f -
if ($LASTEXITCODE) {exit $LASTEXITCODE}
# Give a few seconds for stress watcher to initialize the federated identity credential
# and create the service account before we reference it
Write-Host "Waiting 15 seconds for namespace federated credentials to be created and synced"
Start-Sleep 15
}
Write-Host "Adding default resource requests to namespace/$($pkg.Namespace)"
$limitRangeSpec | kubectl apply -n $pkg.Namespace -f -
if ($LASTEXITCODE) {exit $LASTEXITCODE}
Expand Down

0 comments on commit 9d9f047

Please sign in to comment.