-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s.yml
96 lines (91 loc) · 1.64 KB
/
k8s.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
apiVersion: v1
kind: ConfigMap
metadata:
name: lamarr-config-map
data:
APP_NAME: "Lamarr"
LOG_LEVEL: "error"
DEBUG: "false"
API_ADDR: "0.0.0.0:7000"
DISCORD_OWNER_ID: ""
DISCORD_GUILD_ID: ""
DB_DATABASE: "lamarr"
DB_HOSTNAME: "lamarr-db.external.svc"
DB_PORT: "5432"
---
apiVersion: v1
kind: Secret
metadata:
name: lamarr-secrets
data:
DISCORD_TOKEN: base64
DB_USERNAME: base64
DB_PASSWORD: base64
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: lamarr-deployment
labels:
app: lamarr
spec:
selector:
matchLabels:
app: lamarr
template:
metadata:
labels:
app: lamarr
spec:
containers:
- name: lamarr
image: localhost:5000/lamarr
imagePullPolicy: Always
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 7000
envFrom:
- configMapRef:
name: lamarr-config-map
- secretRef:
name: lamarr-secrets
---
apiVersion: v1
kind: Service
metadata:
name: lamarr-db
spec:
type: ExternalName
externalName: host.docker.internal
ports:
- port: 5432
---
apiVersion: v1
kind: Service
metadata:
name: lamarr-service
spec:
selector:
app: lamarr
ports:
- port: 7000
targetPort: 7000
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: lamarr-ingress
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: lamarr-service
port:
number: 80