forked from udacity/cd0354-monolith-to-microservices-project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
backend-feed-deployment.yaml
85 lines (85 loc) · 2.27 KB
/
backend-feed-deployment.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
77
78
79
80
81
82
83
84
85
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-feed
labels:
app: backend-feed
spec:
replicas: 3
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 25%
type: RollingUpdate
selector:
matchLabels:
app: backend-feed
template:
metadata:
labels:
app: backend-feed
spec:
containers:
- name: backend-feed
image: annulus/udagram-api-feed:v1
imagePullPolicy: Always
resources:
requests:
cpu: "250m"
limits:
cpu: "500m"
env:
- name: POSTGRES_USERNAME
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_USERNAME
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: env-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_HOST
- name: POSTGRES_DATABASE
valueFrom:
configMapKeyRef:
name: env-configmap
key: POSTGRES_DATABASE
- name: AWS_S3_BUCKET
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_S3_BUCKET
- name: AWS_REGION
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_REGION
- name: AWS_PROFILE
valueFrom:
configMapKeyRef:
name: env-configmap
key: AWS_PROFILE
- name: JWT_SECRET
valueFrom:
configMapKeyRef:
name: env-configmap
key: JWT_SECRET
- name: URL
valueFrom:
configMapKeyRef:
name: env-configmap
key: URL
volumeMounts:
- name: aws-secret
mountPath: "/root/.aws/"
readOnly: true
restartPolicy: Always
volumes:
- name: aws-secret
secret:
secretName: aws-secret