-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
81 lines (81 loc) · 1.52 KB
/
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
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
# namespace: maquette
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-pods
# namespace: maquette
subjects:
- kind: ServiceAccount
name: default
roleRef:
kind: Role
name: pod-reader
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: shoutbox
# namespace: maquette
spec:
selector:
matchLabels:
app: shoutbox
replicas: 2
template:
metadata:
labels:
app: shoutbox
spec:
containers:
- name: shoutbox
image: shoutbox:latest
imagePullPolicy: Never
ports:
- containerPort: 4000
env:
- name: SECRET_KEY_BASE
value: "T/y+hmDVluJt8pN5vFPrmrWql6wL9fzy0h5g7gAwmZZTFOWiED1H+U6L7UEVEMrR"
- name: PORT
value: "4000"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
---
apiVersion: v1
kind: Service
metadata:
name: shoutbox
# namespace: maquette
spec:
selector:
app: shoutbox
ports:
- port: 4000
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: default-ingress
# namespace: maquette
spec:
defaultBackend:
service:
name: shoutbox
port:
number: 4000