-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.yaml
76 lines (72 loc) · 1.52 KB
/
deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: dictionary
spec:
selector:
matchLabels:
app: dictionary
replicas: 1
template:
metadata:
labels:
app: dictionary
spec:
containers:
- name: dictionary
image: <X>
ports:
- containerPort: 5001
resources:
requests:
cpu: 100m
envFrom:
- secretRef:
name: dict-dynamodb-secrets
readinessProbe:
httpGet:
path: /dictionary/health-check
port: 5001
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 30
successThreshold: 1
failureThreshold: 2
livenessProbe:
httpGet:
scheme: HTTP
path: /dictionary/health-check
port: 5001
initialDelaySeconds: 120
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
---
apiVersion: v1
kind: Service
metadata:
name: surf-dictionary
spec:
selector:
app: dictionary
ports:
- name: http
port: 5001
targetPort: 5001
protocol: TCP
type: ClusterIP
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: dictionary
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: dictionary
minReplicas: 1
maxReplicas: 10
targetCPUUtilizationPercentage: 50