-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yml
60 lines (58 loc) · 1.35 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
53
54
55
56
57
58
59
60
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-liveness-readiness-deployment
spec:
replicas: 1
selector:
matchLabels:
app: api-liveness-readiness-deployment
template:
metadata:
labels:
app: api-liveness-readiness-deployment
spec:
containers:
- name: api-liveness-readiness
image: [NOME_DA_IMAGEM_GERADA]
ports:
- containerPort: 3000
livenessProbe:
httpGet:
path: /health/liveness
port: 3000
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 3
successThreshold: 1
readinessProbe:
httpGet:
path: /health/readiness
port: 3000
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 3
successThreshold: 1
env:
- name: DATABASE_HOST
value: [WSL_ENDPOINT]
- name: DATABASE_USERNAME
value: [DATABASE_USERNAME]
- name: DATABASE_PASSWORD
value: [DATABASE_PASSWORD]
- name: DATABASE_NAME
value: [DATABASE_NAME]
---
apiVersion: v1
kind: Service
metadata:
name: api-liveness-readiness-service
spec:
selector:
name: api-liveness-readiness-deployment
ports:
- name: http
protocol: TCP
port: 3000
targetPort: 3000
type: ClusterIP