-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeployment.yml
More file actions
86 lines (86 loc) · 2.37 KB
/
Copy pathdeployment.yml
File metadata and controls
86 lines (86 loc) · 2.37 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
78
79
80
81
82
83
84
85
86
apiVersion: apps/v1
kind: Deployment
metadata:
name: vacation-planner-sql
namespace: vacation-planner-sql
labels:
app: vacation-planner-sql
spec:
replicas: 3
selector:
matchLabels:
app: vacation-planner-sql
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
minReadySeconds: 5
template:
metadata:
labels:
app: vacation-planner-sql
spec:
nodeSelector:
kubernetes.io/os: linux
containers:
- name: vacation-planner-sql
image: <your-registry>.azurecr.io/vacation-planner-sql:v1
imagePullPolicy: Always
ports:
- name: http
containerPort: 8080
env:
- name: SQL_SERVER
valueFrom:
configMapKeyRef:
name: vacation-planner-sql-config
key: SQL_SERVER
- name: SQL_DATABASE
valueFrom:
configMapKeyRef:
name: vacation-planner-sql-config
key: SQL_DATABASE
- name: SQL_USERNAME
valueFrom:
configMapKeyRef:
name: vacation-planner-sql-config
key: SQL_USERNAME
- name: LOGIN_NAME
valueFrom:
configMapKeyRef:
name: vacation-planner-sql-config
key: LOGIN_NAME
- name: SQL_PASSWORD
valueFrom:
secretKeyRef:
name: vacation-planner-sql-secrets
key: SQL_PASSWORD
- name: FLASK_SECRET_KEY
valueFrom:
secretKeyRef:
name: vacation-planner-sql-secrets
key: FLASK_SECRET_KEY
resources:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "1000m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3