-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stress test debug file share usage example
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
tools/stress-cluster/chaos/examples/stress-debug-share-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: debug-share-example | ||
description: An example stress test chart that uses a file share for debugging (e.g. for large log files, heap dumps) | ||
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.9 | ||
repository: https://stresstestcharts.blob.core.windows.net/helm/ |
21 changes: 21 additions & 0 deletions
21
...s/stress-cluster/chaos/examples/stress-debug-share-example/templates/debug-share-job.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,21 @@ | ||
{{- include "stress-test-addons.env-job-template.from-pod" (list . "stress.deploy-example") -}} | ||
{{- define "stress.deploy-example" -}} | ||
metadata: | ||
labels: | ||
testName: "debug-share-example" | ||
spec: | ||
containers: | ||
- name: debug-share-example | ||
image: busybox | ||
command: ['sh', '-c'] | ||
args: | ||
- | | ||
cd $DEBUG_SHARE; | ||
pwd; | ||
mkdir example; | ||
echo "debug share example success" > example/success; | ||
ls; ls example; cat example/success; | ||
# The file share is mounted by default at the path $DEBUG_SHARE | ||
# when including the container-env template | ||
{{- include "stress-test-addons.container-env" . | nindent 6 }} | ||
{{- end -}} |