-
Notifications
You must be signed in to change notification settings - Fork 0
/
slave-deployment.yaml
60 lines (60 loc) · 1.39 KB
/
slave-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
apiVersion: apps/v1
kind: Deployment
metadata:
name: locust-slave-deployment
labels:
app: locust-slave
spec:
replicas: 15
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
selector:
matchLabels:
app: locust-slave
template:
metadata:
labels:
app: locust-slave
spec:
containers:
- name: locust-slave
image: locustio/locust
ports:
- containerPort: 8089
env:
- name: LOCUSTFILE_PATH
value: /mnt/locust/locustfile.py
- name: TARGET_URL
value: ##TARGET_URL##
- name: LOCUST_MODE
value: slave
- name: LOCUST_MASTER_HOST
value: ##LOCUST_MASTER_HOST_IP##
- name: PYTHONUNBUFFERED
value: "0"
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: "/mnt/locust"
name: master-volume
initContainers:
- name: install
image: busybox
command:
- wget
- "-O"
- "/mnt/locust/locustfile.py"
- ##LOCUST_SCRIPT_URL##
volumeMounts:
- mountPath: "/mnt/locust"
name: master-volume
dnsPolicy: Default
volumes:
- name: master-volume
emptyDir: {}