-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
76 lines (75 loc) · 1.76 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: profile-1
name: profile-1
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: profile-1
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
labels:
app: profile-1
spec:
containers:
- env:
- name: JWT_SECRET_KEY
valueFrom:
secretKeyRef:
key: DJANGO_SECRET_KEY
name: auth-dj-secret-key
- name: POSTGRES_HOST
valueFrom:
secretKeyRef:
key: POSTGRES_HOST
name: profile-db-credentials
- name: POSTGRES_PORT
valueFrom:
secretKeyRef:
key: POSTGRES_PORT
name: profile-db-credentials
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
key: POSTGRES_DB
name: profile-db-credentials
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
key: POSTGRES_USER
name: profile-db-credentials
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: POSTGRES_PASSWORD
name: profile-db-credentials
name: profile-sha256-01
image: gcr.io/PROJECT_ID/IMAGE:TAG
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
labels:
app: profile-1
name: profile-1-hpa
namespace: default
spec:
maxReplicas: 5
metrics:
- resource:
name: cpu
targetAverageUtilization: 80
type: Resource
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: profile-1