forked from ThoughtWorksInc/infra-problem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrontend.yaml
81 lines (79 loc) · 1.71 KB
/
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: docker.io/nivisco88/tw-app:latest
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 8000
- containerPort: 8080
env:
- name: APP_PORT
value: "8080"
- name: STATIC_URL
value: "http://0.0.0.0:8000"
- name: QUOTE_SERVICE_URL
value: "http://10.244.0.13:8081"
- name: NEWSFEED_SERVICE_URL
value: "http://10.244.0.14:8082"
- name: NEWSFEED_SERVICE_TOKEN
valueFrom:
secretKeyRef:
name: mysecret
key: NEWSFEED_SERVICE_TOKEN
command:
- "./front-end/public/serve.py"
- "java"
- "-jar"
- "build/front-end.jar"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: external-ip-config
data:
EXTERNAL_IP: $AKS_EXTERNAL_IP
---
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/azure-load-balancer-resource-group: twapp
service.beta.kubernetes.io/azure-pip-name: aks-public-ip
name: frontend-service
spec:
selector:
app: frontend
ports:
- name: port1
protocol: TCP
port: 8000
targetPort: 8000
- name: port2
protocol: TCP
port: 8080
targetPort: 8080
type: LoadBalancer