diff --git a/Makefile b/Makefile index 0dbe29a56907..2f46ad259567 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/manifests/quick-start-minimal.yaml b/manifests/quick-start-minimal.yaml index 12e4ad9b2511..8c80b9be3b0a 100644 --- a/manifests/quick-start-minimal.yaml +++ b/manifests/quick-start-minimal.yaml @@ -329,6 +329,13 @@ rules: verbs: - get - watch +- apiGroups: + - argoproj.io + resources: + - workflows + verbs: + - create + - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/manifests/quick-start-mysql.yaml b/manifests/quick-start-mysql.yaml index cc403199bdee..12054d70f515 100644 --- a/manifests/quick-start-mysql.yaml +++ b/manifests/quick-start-mysql.yaml @@ -329,6 +329,13 @@ rules: verbs: - get - watch +- apiGroups: + - argoproj.io + resources: + - workflows + verbs: + - create + - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/manifests/quick-start-postgres.yaml b/manifests/quick-start-postgres.yaml index f99116e87dd4..409a1c990029 100644 --- a/manifests/quick-start-postgres.yaml +++ b/manifests/quick-start-postgres.yaml @@ -329,6 +329,13 @@ rules: verbs: - get - watch +- apiGroups: + - argoproj.io + resources: + - workflows + verbs: + - create + - get --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/manifests/quick-start/base/workflow-role.yaml b/manifests/quick-start/base/workflow-role.yaml index 8d0170977685..15850395218b 100644 --- a/manifests/quick-start/base/workflow-role.yaml +++ b/manifests/quick-start/base/workflow-role.yaml @@ -21,4 +21,13 @@ rules: - pods/log verbs: - get - - watch \ No newline at end of file + - watch + # This allows one workflow to create another. + # Not needed for the majority of use cases. + - apiGroups: + - argoproj.io + resources: + - workflows + verbs: + - create + - get \ No newline at end of file diff --git a/test/e2e/cli_test.go b/test/e2e/cli_test.go index 42c93fe9acda..41a326293548 100644 --- a/test/e2e/cli_test.go +++ b/test/e2e/cli_test.go @@ -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() { diff --git a/test/e2e/stress/many-massive-workflows.yaml b/test/e2e/stress/many-massive-workflows.yaml new file mode 100644 index 000000000000..367c59ae97ba --- /dev/null +++ b/test/e2e/stress/many-massive-workflows.yaml @@ -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 diff --git a/test/e2e/stress/massive-workflow.yaml b/test/e2e/stress/massive-workflow.yaml deleted file mode 100644 index e1886e7ea421..000000000000 --- a/test/e2e/stress/massive-workflow.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# massive workflows -# DAGs with 9 tasks a piece -apiVersion: argoproj.io/v1alpha1 -kind: Workflow -metadata: - name: massive-workflow -spec: - entrypoint: main - arguments: - parameters: - - name: limit - value: 1000 - - podGC: - strategy: OnPodCompletion - - templates: - - name: main - steps: - - - name: dag - template: dag - withSequence: - count: "{{workflow.parameters.limit}}" - - name: dag - dag: - tasks: - - name: A - template: whalesay - - name: B - template: whalesay - dependencies: [A] - - name: C - template: whalesay - dependencies: [A] - - name: D - template: whalesay - dependencies: [B, C] - - name: E - template: whalesay - dependencies: [B, C] - - name: F - template: whalesay - dependencies: [B, C] - - name: G - template: whalesay - dependencies: [D, E, F] - - name: H - template: whalesay - dependencies: [D, E, F] - - name: I - template: whalesay - dependencies: [D, E, F] - - name: whalesay - container: - image: argoproj/argosay:v2 - args: [sleep, 1s]