-
Notifications
You must be signed in to change notification settings - Fork 488
/
Copy pathexample-frontend.yaml
61 lines (60 loc) · 1.36 KB
/
example-frontend.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: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: pitaya-example
name: frontend
namespace: pitaya-example
spec:
replicas: 3
selector:
matchLabels:
app: pitaya-example
template:
metadata:
labels:
app: pitaya-example
server: frontend
spec:
containers:
- image: quay.io/felipejfc/pitaya-example-sv:v1
command:
- /server
- -type
- connector
- -frontend=true
env:
- name: PITAYA_CLUSTER_RPC_CLIENT_NATS_CONNECT
value: nats://nats-cluster-1.nats-io.svc.cluster.local:4222
- name: PITAYA_CLUSTER_RPC_SERVER_NATS_CONNECT
value: nats://nats-cluster-1.nats-io.svc.cluster.local:4222
- name: PITAYA_CLUSTER_SD_ETCD_ENDPOINTS
value: etcd-cluster-1.etcd.svc.cluster.local:2379
- name: PITAYA_HEARTBEAT_INTERVAL
value: 10s
name: frontend
resources:
limits:
cpu: 1000m
memory: 300Mi
requests:
cpu: 100m
memory: 200Mi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: pitaya-example
name: frontend
namespace: pitaya-example
spec:
ports:
- name: tcp
port: 32222
protocol: TCP
targetPort: 32222
selector:
app: pitaya-example
server: frontend
type: LoadBalancer