-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yaml
56 lines (53 loc) · 1.14 KB
/
k8s.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
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zgroup
spec:
selector:
matchLabels:
app: zgroup
replicas: 1
revisionHistoryLimit: 5
template:
metadata:
labels:
app: zgroup
spec:
containers:
- name: zgroup
image: quay.io/flowerinthenight/zgroup:v0.3.2
command: ["/bin/sh"]
args: ["-c", '/app/zgroup group1 ${K8S_MY_POD_IP}:8080']
resources:
requests:
cpu: 100m
memory: 500Mi
limits:
cpu: 100m
memory: 500Mi
imagePullPolicy: Always
env:
- name: K8S_MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: GET_HOSTS_FROM
value: dns
- name: ZGROUP_JOIN_PREFIX
value: "c06a9044-856d-4583-8095-c57d37272b05"
ports:
- containerPort: 8080
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: zgroup-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: zgroup
minReplicas: 3
maxReplicas: 3
targetCPUUtilizationPercentage: 40