-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfrontend.yml
57 lines (54 loc) · 1.03 KB
/
frontend.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
#@ load("@ytt:data", "data")
#@ frontend_port = 80
#@ def labels():
frontend: ""
#@ end
---
apiVersion: v1
kind: Service
metadata:
namespace: default
name: frontend
spec:
ports:
- port: #@ frontend_port
selector: #@ labels()
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: default
name: frontend
annotations:
kapp.k14s.io/update-strategy: fallback-on-replace
spec:
replicas: 1
selector:
matchLabels: #@ labels()
template:
metadata:
labels: #@ labels()
spec:
containers:
- name: frontend
image: gcr.io/google-samples/gb-frontend:v4
resources:
requests:
cpu: 100m
memory: 100Mi
envFrom:
- configMapRef:
name: frontend-config
ports:
- containerPort: #@ frontend_port
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: default
name: frontend-config
annotations:
kapp.k14s.io/versioned: ""
data:
GUESTBOOK_REDIS_PORT: #@ str(data.values.redis_port)
GUESTBOOK_BG: "#eee"