forked from mgsgoms/Docker-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frontend.yaml
98 lines (97 loc) · 1.84 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: frontend
run: frontend
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- image: 10.128.0.2:5000/mgsgoms/flask:${BUILD_NUMBER}
name: frontend
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 1
labels:
app: backend
run: backend
name: backend
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
run: backend
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
run: backend
spec:
containers:
- image: 10.128.0.2:5000/mgsgoms/mysql:${BUILD_NUMBER}
imagePullPolicy: IfNotPresent
args: ["--default-authentication-plugin=mysql_native_password"]
name: backend
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
labels:
app: frontend
name: frontend
namespace: default
spec:
ports:
- nodePort: 32333
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: frontend
sessionAffinity: None
type: NodePort
---
apiVersion: v1
kind: Service
metadata:
labels:
app: backend
name: backend
namespace: default
spec:
ports:
- port: 3306
protocol: TCP
targetPort: 3306
selector:
run: backend
sessionAffinity: None
type: ClusterIP