Skip to content

Commit

Permalink
Merge pull request #624 from sdowell/fix-stress-test
Browse files Browse the repository at this point in the history
test: reduce size of stress test deployments
  • Loading branch information
k8s-ci-robot authored Jul 18, 2023
2 parents ed4ec48 + 71adec9 commit 8609e42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions test/stress/artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,17 @@ spec:
replicas: 1
selector:
matchLabels:
app: nginx
app: pause
template:
metadata:
labels:
app: nginx
app: pause
spec:
containers:
- name: nginx
image: nginx:1.19.6
ports:
- containerPort: 80
- name: kubernetes-pause
image: registry.k8s.io/pause:2.0
resources:
requests:
cpu: 10m
cpu: 1m
memory: 1Mi
`
2 changes: 1 addition & 1 deletion test/stress/thousand_deployments_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func thousandDeploymentsRetryTest(ctx context.Context, c client.Client, invConfi
deploymentObj.SetNamespace(namespaceName)

// change name & selector labels to avoid overlap between deployments
name := fmt.Sprintf("nginx-%d", i)
name := fmt.Sprintf("pause-%d", i)
deploymentObj.SetName(name)
err := unstructured.SetNestedField(deploymentObj.Object, name, "spec", "selector", "matchLabels", "app")
Expect(err).ToNot(HaveOccurred())
Expand Down
2 changes: 1 addition & 1 deletion test/stress/thousand_deployments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func thousandDeploymentsTest(ctx context.Context, c client.Client, invConfig inv
deploymentObj.SetNamespace(namespaceName)

// change name & selector labels to avoid overlap between deployments
name := fmt.Sprintf("nginx-%d", i)
name := fmt.Sprintf("pause-%d", i)
deploymentObj.SetName(name)
err := unstructured.SetNestedField(deploymentObj.Object, name, "spec", "selector", "matchLabels", "app")
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit 8609e42

Please sign in to comment.