-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yml
52 lines (52 loc) · 1.16 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: smilehelper-app
spec:
replicas: 1
selector:
matchLabels:
app: smilehelper-app
template:
metadata:
labels:
app: smilehelper-app
spec:
containers:
- name: smilehelper-app
image: gcr.io/smile-helper/smilehelper-app:latest
ports:
- containerPort: 8080
env:
- name: DB_URL
valueFrom:
secretKeyRef:
name: db-secret
key: DB_URL
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: db-secret
key: DB_USERNAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: DB_PASSWORD
- name: SPRING_PROFILES_ACTIVE
value: "k8s"
imagePullSecrets:
- name: gcr-json-key
---
apiVersion: v1
kind: Service
metadata:
name: smilehelper-service
spec:
type: LoadBalancer
selector:
app: smilehelper-app
ports:
- protocol: TCP
port: 8082
targetPort: 8080