Skip to content

Commit

Permalink
Use stress-test-resources file naming to avoid live test auto-discove…
Browse files Browse the repository at this point in the history
…ry (#2039)

* Use stress-test-resources file naming to avoid live test auto-discovery

* Mount stress-test-resources.json to test-resources.json

* Bump stress-test-addons chart version
  • Loading branch information
benbp authored Sep 27, 2021
1 parent 62be3b1 commit 669998c
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 27 deletions.
4 changes: 2 additions & 2 deletions eng/common/scripts/stress-testing/deploy-stress-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function DeployStressPackage(
Run helm dependency update $pkg.Directory
if ($LASTEXITCODE) { return }

if (Test-Path "$($pkg.Directory)/test-resources.bicep") {
Run az bicep build -f "$($pkg.Directory)/test-resources.bicep"
if (Test-Path "$($pkg.Directory)/stress-test-resources.bicep") {
Run az bicep build -f "$($pkg.Directory)/stress-test-resources.bicep"
if ($LASTEXITCODE) { return }
}

Expand Down
16 changes: 8 additions & 8 deletions tools/stress-cluster/chaos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,20 @@ The basic layout for a stress test is the following (see `examples/stress_deploy

```
<stress test root directory>
Dockerfile # A Dockerfile for building the stress test image
test-resources.[bicep|json] # An Azure Bicep or ARM template for deploying stress test azure resources.
parameters.json # An ARM template parameters file that will be used at runtime along with the ARM template
Dockerfile # A Dockerfile for building the stress test image
stress-test-resources.[bicep|json] # An Azure Bicep or ARM template for deploying stress test azure resources.
parameters.json # An ARM template parameters file that will be used at runtime along with the ARM template
Chart.yaml # A YAML file containing information about the helm chart and its dependencies
templates/ # A directory of helm templates that will generate Kubernetes manifest files.
# Most commonly this will contain a Job/Pod spec snippet and a chaos mesh manifest.
Chart.yaml # A YAML file containing information about the helm chart and its dependencies
templates/ # A directory of helm templates that will generate Kubernetes manifest files.
# Most commonly this will contain a Job/Pod spec snippet and a chaos mesh manifest.
# Optional files/directories
values.yaml # Any default helm template values for this chart, e.g. a `scenarios` list
<misc scripts/configs> # Any language specific files for building/running/deploying the test
<source directories> # Directories containing code for stress tests
<bicep modules> # Any additional bicep module files/directories referenced by test-resources.bicep
<bicep modules> # Any additional bicep module files/directories referenced by stress-test-resources.bicep
```

### Stress Test Metadata
Expand Down Expand Up @@ -201,7 +201,7 @@ RESOURCE_GROUP=<value>
### Stress Test Azure Resources

Stress test resources can either be defined as azure bicep files, or an ARM template directly, provided there is
a `chart/test-resources.json` file in place before running `helm install`.
a `chart/stress-test-resources.json` file in place before running `helm install`.
The stress test cluster and config boilerplate will handle running ARM deployments in an init container before
stress test container startup.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ annotations:

dependencies:
- name: stress-test-addons
version: 0.1.6
version: 0.1.7
repository: https://stresstestcharts.blob.core.windows.net/helm/
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ annotations:

dependencies:
- name: stress-test-addons
version: 0.1.6
version: 0.1.7
repository: https://stresstestcharts.blob.core.windows.net/helm/

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ex
export AZURE_STORAGE_ACCOUNT=stresstestcharts
export AZURE_STORAGE_KEY=$(az storage account keys list --account-name $AZURE_STORAGE_ACCOUNT -o tsv --query '[0].value')

rm *.tgz
rm -f ./*.tgz

helm package .
helm repo index --url https://stresstestcharts.blob.core.windows.net/helm/ --merge index.yaml .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ entries:
stress-test-addons:
- apiVersion: v2
appVersion: v0.1
created: "2021-08-13T17:23:40.9241683-04:00"
created: "2021-09-24T17:01:27.6168346-04:00"
description: Baseline resources and templates for stress testing clusters
digest: 2e0e076ca62ea57d05624e74880717e7edf0cbeda4d878132344702b376c3b71
digest: 8c775cda83c851f4465c6b5dd575d5b7ddc26d01dd1d6308d8247ec7c411b015
name: stress-test-addons
urls:
- https://stresstestcharts.blob.core.windows.net/helm/stress-test-addons-0.1.6.tgz
Expand Down Expand Up @@ -46,4 +46,4 @@ entries:
urls:
- https://stresstestcharts.blob.core.windows.net/helm/stress-test-addons-0.1.2.tgz
version: 0.1.2
generated: "2021-08-13T17:23:40.9233485-04:00"
generated: "2021-09-24T17:01:27.6162169-04:00"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
namespace: {{ .Release.Namespace }}
data:
template: |
{{- .Files.Get "test-resources.json" | nindent 4 }}
{{- .Files.Get "stress-test-resources.json" | nindent 4 }}
parameters: |
{{- .Files.Get "parameters.json" | nindent 4 }}
{{ end }}

0 comments on commit 669998c

Please sign in to comment.