-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.yml
196 lines (183 loc) · 4.41 KB
/
app.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: apollos-crib
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: apollos-crib
namespace: apollos-crib
labels:
name: apollos-crib
keel.sh/policy: force
keel.sh/trigger: poll
spec:
replicas: 1
selector:
matchLabels:
name: apollos-crib
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
template:
metadata:
labels:
name: apollos-crib
annotations:
spec:
containers:
- image: r.g.gmp.io/lambentri/apollos-crib:latest
resources:
requests:
memory: "1536Mi"
cpu: "250m"
limits:
memory: "3000Mi"
cpu: "500m"
imagePullPolicy: Always
# livenessProbe:
# httpGet:
# path: /health/live
# port: 4040
#
# initialDelaySeconds: 90
# periodSeconds: 3
#
# readinessProbe:
# httpGet:
# path: /health/ready
# port: 4040
#
# initialDelaySeconds: 90
# periodSeconds: 3
env:
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: elixir-args
key: sentry_dsn
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: elixir-args
key: secret_key_base
- name: POSTGRES_HOST
value: postgres-apollos-crib.demo
- name: POSTGRES_PORT
valueFrom:
secretKeyRef:
name: postgres-auth
key: port
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres-apollos-crib-auth
key: username
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-apollos-crib-auth
key: password
- name: AMQP_USER
valueFrom:
secretKeyRef:
name: rabbitmq-default-user
key: username
- name: AMQP_PASS
valueFrom:
secretKeyRef:
name: rabbitmq-default-user
key: password
- name: DATABASE_URL
value: ecto://$(POSTGRES_USER):$(POSTGRES_PASSWORD)@$(POSTGRES_HOST):$(POSTGRES_PORT)/apollos-crib
- name: RABBIT_URL
value: amqp://$(AMQP_USER):$(AMQP_PASS)@rabbitmq:5672
- name: PHX_HOST
value: ac.gmp.io
name: apollos-crib
ports:
- containerPort: 4000
- containerPort: 4001
imagePullSecrets:
- name: gitlabgmp
priorityClassName: high-priority
---
apiVersion: v1
kind: Service
metadata:
name: apollos-crib-svc
namespace: apollos-crib
spec:
ports:
- port: 80
targetPort: 4000
protocol: TCP
selector:
name: apollos-crib
---
apiVersion: v1
kind: Service
metadata:
name: apollos-crib-hermes-svc
namespace: apollos-crib
spec:
ports:
- port: 80
targetPort: 4001
protocol: TCP
selector:
name: apollos-crib
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: apollos-crib-ingress
namespace: apollos-crib
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: "traefik"
spec:
tls:
- hosts:
# CHANGE ME
- ac.gmp.io
- apollos.gmp.io
- apollos-crib.gmp.io
secretName: apollos-crib-tls
rules:
# CHANGE ME
- host: ac.gmp.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: apollos-crib-svc
port:
number: 80
- host: apollos.gmp.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: apollos-crib-svc
port:
number: 80
- host: apollos-crib.gmp.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: apollos-crib-svc
port:
number: 80
# EOF