-
Notifications
You must be signed in to change notification settings - Fork 0
/
master-deployment.yaml
70 lines (70 loc) · 1.49 KB
/
master-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
61
62
63
64
65
66
67
68
69
70
apiVersion: apps/v1
kind: Deployment
metadata:
name: locust-master-deployment
labels:
app: locust-master
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
selector:
matchLabels:
app: locust-master
template:
metadata:
labels:
app: locust-master
spec:
containers:
- name: locust-master
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: master
- 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: {}
---
apiVersion: v1
kind: Service
metadata:
name: locust-loadbalancer
spec:
type: LoadBalancer
ports:
- port: 8089
targetPort: 8089
selector:
app: locust-master