-
Notifications
You must be signed in to change notification settings - Fork 0
/
laravel-products-api.yml
84 lines (84 loc) · 1.73 KB
/
laravel-products-api.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
76
77
78
79
80
81
82
83
84
apiVersion: v1
kind: ConfigMap
metadata:
name: dbconfigmap
data:
DB_PORT: "3306"
---
apiVersion: v1
kind: Secret
metadata:
name: dbsecrets
type: Opaque
data:
DB_HOST: MzQuMTMyLjE2NS4yMzQ=
DB_USERNAME: aHV0
DB_PASSWORD: MTIz
DB_DATABASE: aW52ZW50YXJpbw==
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: laravel-products-api
namespace: default
labels:
app: laravel-products-api
spec:
revisionHistoryLimit: 2
strategy:
type: RollingUpdate
replicas: 2
selector:
matchLabels:
app: laravel-products-api
template:
metadata:
labels:
app: laravel-products-api
spec:
containers:
- name: laravel-products-api
image: ualmtorres/laravel-products-api:v0
ports:
- name: http
containerPort: 8000
env:
- name: DB_PORT
valueFrom:
configMapKeyRef:
name: dbconfigmap
key: DB_PORT
- name: DB_HOST
valueFrom:
secretKeyRef:
name: dbsecrets
key: DB_HOST
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: dbsecrets
key: DB_USERNAME
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: dbsecrets
key: DB_PASSWORD
- name: DB_DATABASE
valueFrom:
secretKeyRef:
name: dbsecrets
key: DB_DATABASE
---
apiVersion: v1
kind: Service
metadata:
name: laravel-products-api
namespace: default
spec:
type: LoadBalancer
ports:
- name: http
port: 8000
targetPort: http
selector:
app: laravel-products-api