Skip to content

Commit b11819f

Browse files
authored
Merge pull request #9315 from zalando-incubator/loadtest-internal-path
Add internal path for loadtest
2 parents 6406879 + 55eca2a commit b11819f

File tree

6 files changed

+39
-10
lines changed

6 files changed

+39
-10
lines changed

cluster/config-defaults.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ spot_node_rescheduler_cpu: "50m"
689689

690690
# Enable and configure prevent scale down annotation
691691
teapot_admission_controller_prevent_scale_down_enabled: "true"
692-
{{if eq .Cluster.Environment "production"}}
692+
{{if or (eq .Cluster.Environment "production") (eq .Cluster.Environment "e2e")}}
693693
teapot_admission_controller_prevent_scale_down_allowed: "true"
694694
{{else}}
695695
teapot_admission_controller_prevent_scale_down_allowed: "false"

test/e2e/loadtest/backend/loadtest-target-routegroup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
- backendName: simulation
1212
hosts:
1313
- %TARGET%.%ZONE%
14-
- %TARGET%.ingress.cluster.local
14+
- loadtest-e2e.ingress.cluster.local
1515
routes:
1616
- pathSubtree: /
1717
filters:

test/e2e/loadtest/client/loadtest-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ metadata:
88
data:
99
routes.eskip: |
1010
h: PathSubtree("/healthz") -> status(200) -> inlineContent("OK") -> <shunt>;
11-
r: * -> "https://%TARGET%.%ZONE%";
12-
get.txt: |
11+
e: Host("external.zalan.do") -> "https://%TARGET%.%ZONE%";
12+
i: Host("internal.zalan.do") -> "http://loadtest-e2e.ingress.cluster.local";
13+
get_external.txt: |
1314
GET http://127.0.0.1:9090
15+
Host: external.zalan.do
16+
get_internal.txt: |
17+
GET http://127.0.0.1:9090
18+
Host: internal.zalan.do

test/e2e/loadtest/client/loadtest-deployment.yaml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
prometheus.io/path: /metrics
2121
prometheus.io/port: "9911"
2222
prometheus.io/scrape: "true"
23+
zalando.org/prevent-scale-down: "true"
2324
labels:
2425
application: e2e-vegeta
2526
spec:
@@ -59,18 +60,18 @@ spec:
5960
resources:
6061
limits:
6162
cpu: "1"
62-
memory: 1500Mi
63+
memory: 4Gi
6364
requests:
6465
cpu: "1"
65-
memory: 1500Mi
66+
memory: 4Gi
6667
volumeMounts:
6768
- name: cfg
6869
mountPath: /load-targets
6970
- env:
7071
- name: RATE
7172
value: "1000/1s"
7273
- name: TARGET_VARIANT
73-
value: "get.txt"
74+
value: "get_external.txt"
7475
- name: SLEEP_TIME
7576
value: "10"
7677
- name: DURATION
@@ -88,6 +89,28 @@ spec:
8889
volumeMounts:
8990
- name: cfg
9091
mountPath: /load-targets
92+
- env:
93+
- name: RATE
94+
value: "1000/1s"
95+
- name: TARGET_VARIANT
96+
value: "get_internal.txt"
97+
- name: SLEEP_TIME
98+
value: "10"
99+
- name: DURATION
100+
value: "1h"
101+
image: container-registry.zalando.net/teapot/calibrated-loadtest:master-4
102+
imagePullPolicy: IfNotPresent
103+
name: e2e-vegeta-internal
104+
resources:
105+
limits:
106+
cpu: "2"
107+
memory: 4Gi
108+
requests:
109+
cpu: "2"
110+
memory: 4Gi
111+
volumeMounts:
112+
- name: cfg
113+
mountPath: /load-targets
91114
dnsPolicy: ClusterFirst
92115
restartPolicy: Always
93116
volumes:

test/e2e/start-load-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ echo "provision namespace: loadtest-e2e"
9898
kubectl create namespace loadtest-e2e
9999

100100
echo "provision loadtest backend with target https://${TARGET}.${ZONE}"
101-
kubectl create -f ./loadtest/backend
101+
kubectl apply -f ./loadtest/backend
102102

103103
# we do not want to fail on failing curl
104104
set +e
@@ -117,7 +117,7 @@ done
117117
set -e
118118

119119
echo "provision loadtest client"
120-
kubectl create -f ./loadtest/client
120+
kubectl apply -f ./loadtest/client
121121

122122
echo "load test started, waiting ${sleep_seconds} seconds"
123123
sleep "$sleep_seconds"

test/e2e/wait-for-update.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ def update_complete(kind, check_fn):
2525

2626
def daemonset_updated(spec, status):
2727
desired = status.get("desiredNumberScheduled", 0)
28+
updated = status.get("updatedNumberScheduled", 0)
2829
ready = status.get("numberReady", 0)
29-
if desired == ready:
30+
if desired == ready and desired == updated:
3031
return None
3132
else:
3233
return "{}/{} [{}]".format(ready, desired, condition_messages(status))

0 commit comments

Comments
 (0)