forked from Azure/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use deterministic shortname for stress test BaseName (Azure#3746)
* Use deterministic shortname for stress BaseName * Add network stress example with scenarios and basename targeting * Update stress addons to 0.1.20 with BaseName fix * Update stress examples to addons version 0.1.20
- Loading branch information
Showing
17 changed files
with
120 additions
and
16 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
tools/stress-cluster/chaos/examples/network-stress-example/Chart.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: stress-test-addons | ||
repository: https://stresstestcharts.blob.core.windows.net/helm/ | ||
version: 0.1.19 | ||
digest: sha256:617c5c463a27a54f01743c718921a2f668d11b7769958ff9d418627256dec3fa | ||
generated: "2022-06-30T15:10:48.0418404-04:00" | ||
version: 0.1.20 | ||
digest: sha256:174a2f4b768cb47718d4b3d5a506330aa781abb31803fbeaeba3b7eef87a9f38 | ||
generated: "2022-07-25T18:54:24.3081785-04:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tools/stress-cluster/chaos/examples/network-stress-scenarios-example/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v2 | ||
name: network-scenario-example | ||
description: An example stress test chart with network chaos | ||
version: 0.1.1 | ||
appVersion: v0.1 | ||
annotations: | ||
stressTest: 'true' # enable auto-discovery of this test via `find-all-stress-packages.ps1` | ||
example: 'true' # enable auto-discovery filtering `find-all-stress-packages.ps1 -filters @{example='true'}` | ||
namespace: 'examples' | ||
|
||
dependencies: | ||
- name: stress-test-addons | ||
version: 0.1.20 | ||
repository: "@stress-test-charts" |
7 changes: 7 additions & 0 deletions
7
tools/stress-cluster/chaos/examples/network-stress-scenarios-example/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM mcr.microsoft.com/cbl-mariner/base/core:1.0 | ||
# Included packages: https://github.com/microsoft/CBL-Mariner/blob/1.0/SPECS/core-packages/core-packages.spec | ||
|
||
ADD ./poll.sh /poll.sh | ||
RUN chmod +x /poll.sh | ||
|
||
CMD bash /poll.sh |
16 changes: 16 additions & 0 deletions
16
tools/stress-cluster/chaos/examples/network-stress-scenarios-example/poll.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set -x | ||
|
||
if test -f "$ENV_FILE"; then | ||
echo "env file located at $ENV_FILE:" | ||
ls -al $ENV_FILE | ||
else | ||
echo "ENV FILE NOT FOUND" | ||
fi | ||
|
||
while true; | ||
# Azure AKS default outbound rules do not allow ICMP, | ||
# so use wget in place of ping for deployment simplicity | ||
echo "SCENARIO_NAME: $SCENARIO_NAME" | ||
do wget -T1 -t1 --spider http://$SCENARIO_NAME.bing.com | ||
sleep 5 | ||
done |
22 changes: 22 additions & 0 deletions
22
...tress-cluster/chaos/examples/network-stress-scenarios-example/templates/network_loss.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- include "stress-test-addons.chaos-wrapper.tpl" (list . "stress.network-chaos") -}} | ||
{{- define "stress.network-chaos" -}} | ||
apiVersion: chaos-mesh.org/v1alpha1 | ||
kind: NetworkChaos | ||
|
||
spec: | ||
action: loss | ||
direction: to | ||
externalTargets: | ||
- {{ .Stress.Scenario }}.bing.com | ||
mode: one | ||
selector: | ||
labelSelectors: | ||
# .Stress.BaseName is a unique id that can be used for azure resource naming and correlation | ||
testInstance: {{ .Stress.BaseName }} | ||
chaos: "true" | ||
namespaces: | ||
- {{ .Release.Namespace }} | ||
loss: | ||
loss: "100" | ||
correlation: "100" | ||
{{- end -}} |
18 changes: 18 additions & 0 deletions
18
tools/stress-cluster/chaos/examples/network-stress-scenarios-example/templates/testjob.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- include "stress-test-addons.env-job-template.from-pod" (list . "stress.network-example") -}} | ||
{{- define "stress.network-example" -}} | ||
metadata: | ||
labels: | ||
# .Stress.BaseName is a unique id that can be used for azure resource naming and correlation | ||
testInstance: {{ .Stress.BaseName }} | ||
testName: packet-loss | ||
chaos: "true" | ||
spec: | ||
nodeSelector: | ||
sku: 'default' | ||
containers: | ||
- name: network-example | ||
command: ["bash", "poll.sh"] | ||
imagePullPolicy: Always | ||
image: {{ .Values.image }} | ||
{{- include "stress-test-addons.container-env" . | nindent 6 }} | ||
{{- end -}} |
4 changes: 4 additions & 0 deletions
4
tools/stress-cluster/chaos/examples/network-stress-scenarios-example/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
scenarios: | ||
- maps | ||
- images | ||
- videos |
6 changes: 3 additions & 3 deletions
6
tools/stress-cluster/chaos/examples/stress-debug-share-example/Chart.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: stress-test-addons | ||
repository: https://stresstestcharts.blob.core.windows.net/helm/ | ||
version: 0.1.19 | ||
digest: sha256:617c5c463a27a54f01743c718921a2f668d11b7769958ff9d418627256dec3fa | ||
generated: "2022-06-30T15:10:41.0984217-04:00" | ||
version: 0.1.20 | ||
digest: sha256:174a2f4b768cb47718d4b3d5a506330aa781abb31803fbeaeba3b7eef87a9f38 | ||
generated: "2022-07-25T18:54:17.4896935-04:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
tools/stress-cluster/chaos/examples/stress-deployment-example/Chart.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: stress-test-addons | ||
repository: https://stresstestcharts.blob.core.windows.net/helm/ | ||
version: 0.1.19 | ||
digest: sha256:617c5c463a27a54f01743c718921a2f668d11b7769958ff9d418627256dec3fa | ||
generated: "2022-06-30T15:10:30.8276449-04:00" | ||
version: 0.1.20 | ||
digest: sha256:174a2f4b768cb47718d4b3d5a506330aa781abb31803fbeaeba3b7eef87a9f38 | ||
generated: "2022-07-25T18:53:54.6113438-04:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tools/stress-cluster/cluster/kubernetes/stress-test-addons/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters