-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdev.pod.yml
More file actions
205 lines (190 loc) · 4.58 KB
/
Copy pathdev.pod.yml
File metadata and controls
205 lines (190 loc) · 4.58 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
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
197
198
199
200
201
202
203
204
205
apiVersion: v1
kind: Pod
metadata:
name: trainstatus-dev
labels:
app: trainstatus-dev
spec:
# restartPolicy: Always
containers:
- name: postgis
image: docker.io/postgis/postgis:18-3.6-alpine
env:
- name: POSTGRES_USER
value: "trains"
- name: POSTGRES_PASSWORD
value: "trains"
- name: POSTGRES_DB
value: "trains"
ports:
- containerPort: 5432
hostPort: 5432
volumeMounts:
- name: trainstatus-db-dev
mountPath: /var/lib/postgresql/data
- name: postgresql-config
mountPath: /etc/postgresql/postgresql.conf
subPath: postgresql.conf
readOnly: true
- name: postgis-shm
mountPath: /dev/shm
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "1000m"
memory: "1Gi"
livenessProbe:
exec:
command:
- pg_isready
- -U
- trains
- -d
- trains
initialDelaySeconds: 5
periodSeconds: 5
- name: valkey
image: valkey/valkey:alpine
ports:
- containerPort: 6379
hostPort: 6379
volumeMounts:
- name: trainstatus-cache-dev
mountPath: /data
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "250m"
memory: "256Mi"
- name: martin
image: ghcr.io/maplibre/martin:latest
env:
- name: DATABASE_URL
value: "postgresql://trains:trains@127.0.0.1:5432/trains"
args:
- --config
- /config/martin.yml
ports:
- containerPort: 3000
hostPort: 3000
volumeMounts:
- name: geo-data
mountPath: /data
readOnly: true
- name: geo-assets
mountPath: /assets
readOnly: true
- name: martin-config
mountPath: /config/martin.yml
subPath: martin.yml
readOnly: true
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
volumes:
- name: geo-data
image:
reference: ghcr.io/jonerrr/trainstatus-geo-data:latest
pullPolicy: Never
- name: geo-assets
image:
reference: ghcr.io/jonerrr/trainstatus-geo-assets:latest
pullPolicy: Never
- name: trainstatus-db-dev
persistentVolumeClaim:
claimName: trainstatus-db-dev
- name: trainstatus-cache-dev
persistentVolumeClaim:
claimName: trainstatus-cache-dev
- name: martin-config
configMap:
name: martin-config-dev
- name: postgresql-config
configMap:
name: postgresql-config-dev
- name: postgis-shm
emptyDir:
medium: Memory
sizeLimit: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: trainstatus-db-dev
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: trainstatus-cache-dev
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: martin-config-dev
data:
martin.yml: |-
route_prefix: /martin
postgres:
# The connection URL will be read from DATABASE_URL env var
connection_string: $DATABASE_URL
auto_publish:
tables:
from_schemas:
- static
# must be integer (but we are using string)
# id_columns: id
# TODO: add back functions once they are fixed
# functions:
# from_schemas:
# - realtime
sprites:
paths:
- /assets/sprites/dark-matter
- /assets/sprites/frontend
styles:
sources:
dark-matter: /assets/styles/dark-matter.localhost-5173.json
# If STYLE_BASE_URLS contains additional URLs when building geo-assets,
# point this to the matching generated file (for example: dark-matter.example-com.json).
fonts:
paths:
- /assets/fonts
mbtiles:
sources:
basemap: /data/basemap.mbtiles
# should be disabled in prod
web_ui: enable-for-all
cors: true
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-config-dev
data:
postgresql.conf: |-
log_statement = 'all'
log_min_error_statement = 'error'
log_min_messages = 'error'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'