Skip to content

Commit

Permalink
chore: Add stress testing code. Closes argoproj#2899 (argoproj#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Sep 14, 2020
1 parent 9f12062 commit d61a91c
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 65 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,15 @@ test-e2e-cron:
smoke:
go test -count 1 --tags e2e -p 1 -run SmokeSuite ./test/e2e

.PHONY: destress
destress: cli
kubectl delete wf -l stress

.PHONY: stress
stress: destress cli
kubectl apply -f test/e2e/stress/many-massive-workflows.yaml
argo submit --from workflowtemplates/many-massive-workflows -p x=$(X) -p y=$(Y)

# clean

.PHONY: clean
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ rules:
verbs:
- get
- watch
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- create
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ rules:
verbs:
- get
- watch
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- create
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ rules:
verbs:
- get
- watch
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- create
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
11 changes: 10 additions & 1 deletion manifests/quick-start/base/workflow-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ rules:
- pods/log
verbs:
- get
- watch
- watch
# This allows one workflow to create another.
# Not needed for the majority of use cases.
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- create
- get
8 changes: 0 additions & 8 deletions test/e2e/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,6 @@ func (s *CLISuite) TestWorkflowLint() {
}
})
})

// All files in this directory are Workflows, expect success
s.Run("AllWorkflows", func() {
s.Given().
RunCli([]string{"lint", "stress"}, func(t *testing.T, output string, err error) {
assert.NoError(t, err)
})
})
}

func (s *CLIWithServerSuite) TestWorkflowRetry() {
Expand Down
62 changes: 62 additions & 0 deletions test/e2e/stress/many-massive-workflows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: many-massive-workflows
labels:
stress: "true"
spec:
entrypoint: main
podGC:
strategy: OnPodCompletion
arguments:
parameters:
- name: "x"
value: 1
- name: "y"
value: 1
workflowMetadata:
labels:
stress: "true"
templates:
- name: main
dag:
tasks:
- name: create-workflow
template: create-workflow
arguments:
parameters:
- name: i
value: "{{item}}"
withSequence:
count: "{{workflow.parameters.x}}"
- name: create-workflow
inputs:
parameters:
- name: i
resource:
action: create
setOwnerReference: true
manifest: |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: "large-workflow-{{workflow.parameters.x}}x{{workflow.parameters.y}}-{{inputs.parameters.i}}"
labels:
stress: "true"
spec:
entrypoint: main
podGC:
strategy: OnPodCompletion
ttlStrategy:
secondsAfterCompletion: 60
templates:
- name: main
dag:
tasks:
- name: create-pod
template: create-pod
withSequence:
count: "{{workflow.parameters.y}}"
- name: create-pod
container:
image: argoproj/argosay:v2
56 changes: 0 additions & 56 deletions test/e2e/stress/massive-workflow.yaml

This file was deleted.

0 comments on commit d61a91c

Please sign in to comment.