-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
52 lines (52 loc) · 1.36 KB
/
deployment.yml
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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gateway
namespace: platform
spec:
replicas: 2
template:
metadata:
labels:
app: gateway
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- gateway
topologyKey: "kubernetes.io/hostname"
containers:
- name: gateway
image: golang:1.8
livenessProbe:
httpGet:
path: /api.html?type=gateway_test
port: 8888
initialDelaySeconds: 20
timeoutSeconds: 20
periodSeconds: 60
workingDir: "/go/src/gateway"
command: ["go", "run", "src/main.go"]
env:
- name: zk_servers
value: "zk-client.platform:80"
volumeMounts:
- mountPath: "/go/src"
name: code
subPath: code/gateway/gateway
- mountPath: /etc/localtime
name: lt-config
ports:
- containerPort: 8888
volumes:
- name: code
persistentVolumeClaim:
claimName: platform-nas
- hostPath:
path: /etc/localtime
name: lt-config