forked from pixie-io/pixie
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient_deployment.yaml
More file actions
48 lines (48 loc) · 1.44 KB
/
client_deployment.yaml
File metadata and controls
48 lines (48 loc) · 1.44 KB
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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: client
namespace: px-protocol-loadtest
spec:
replicas: 1
selector:
matchLabels:
name: client
template:
metadata:
labels:
name: client
spec:
initContainers:
- name: server-wait
# yamllint disable-line rule:line-length
image: ghcr.io/pixie-io/pixie-oss-pixie-dev-public-curl:8.15.0@sha256:4026b29997dc7c823b51c164b71e2b51e0fd95cce4601f78202c513d97da2922
# yamllint disable rule:line-length
command: ['sh', '-c', 'set -xe;
URL="http://${SERVICE_NAME}:${SERVICE_PORT}/";
until [ $(curl -m 0.5 -s -o /dev/null -w "%{http_code}" -X POST -H "Content-Type: application/json" --data {} ${URL}) -eq 200 ]; do
echo "waiting for ${URL}";
sleep 2;
done;']
# yamllint enable rule:line-length
env:
- name: SERVICE_NAME
value: "server.px-protocol-loadtest.svc.cluster.local"
- name: SERVICE_PORT
value: "8080"
containers:
- name: app
image: protocol_loadtest_client_image:latest
env:
- name: HTTP_PORT
value: "8080"
- name: HTTP_SSL_PORT
value: "8081"
- name: HTTP_HOST
value: "server.px-protocol-loadtest.svc.cluster.local"
- name: HTTP_PATH
value: "/"
envFrom:
- configMapRef:
name: px-protocol-loadtest-config