-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathnext-proxy-deployment.yaml
More file actions
81 lines (77 loc) · 1.91 KB
/
Copy pathnext-proxy-deployment.yaml
File metadata and controls
81 lines (77 loc) · 1.91 KB
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
# https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: languageforge-app
annotations:
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
ingressClassName: traefik
rules:
- host: localhost
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: next-proxy
port:
number: 80
tls:
- hosts:
- localhost
secretName: languageforge-tls
---
# https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
apiVersion: v1
kind: Service
metadata:
labels:
app: next-proxy
name: next-proxy
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
selector:
app: next-proxy
---
# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#writing-a-deployment-spec
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: next-proxy
name: next-proxy
spec:
selector:
matchLabels:
app: next-proxy
template:
# https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates
metadata:
labels:
app: next-proxy
spec:
containers:
- name: next-proxy
# this image doesn't actually exist as for some reason tags were used for different image types instead of just version number.
# this is a workaround because kustomize is designed to work with image names
image: sillsdev/web-languageforge-next-proxy:latest
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers
imagePullPolicy: Always
resources:
requests:
memory: 25Mi
cpu: 0.1
limits:
memory: 75Mi
env:
- name: LEGACY_APP
value: app:80
- name: NEXT_APP
value: next-app:3000