-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
77 lines (77 loc) · 2.08 KB
/
Copy pathdeployment.yaml
File metadata and controls
77 lines (77 loc) · 2.08 KB
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
namespace: dojangkok
labels:
app.kubernetes.io/name: backend
app.kubernetes.io/component: api
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: backend
template:
metadata:
labels:
app.kubernetes.io/name: backend
app.kubernetes.io/component: api
spec:
terminationGracePeriodSeconds: 30
containers:
- name: backend
image: 662505429975.dkr.ecr.ap-northeast-2.amazonaws.com/dev-dojangkok-be:latest
ports:
- name: http
containerPort: 8080
envFrom:
- configMapRef:
name: backend-config
env:
- name: SPRING_CONFIG_LOCATION
value: "file:/app/config/application.yaml"
volumeMounts:
- name: spring-config
mountPath: /app/config
readOnly: true
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
startupProbe:
httpGet:
path: /actuator/health
port: 8080
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 30
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 600m
memory: 1024Mi
lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 10"]
volumes:
- name: spring-config
secret:
secretName: backend-secret
items:
- key: application.yaml
path: application.yaml