Initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: wanderer-config
|
||||
namespace: {{ wanderer_namespace }}
|
||||
data:
|
||||
MEILI_URL: "http://search:7700"
|
||||
ORIGIN: "{{ wanderer_env.origin }}"
|
||||
BODY_SIZE_LIMIT: "{{ wanderer_env.body_size_limit }}"
|
||||
PUBLIC_POCKETBASE_URL: "http://db:8090"
|
||||
PUBLIC_DISABLE_SIGNUP: "{{ wanderer_env.public_disable_signup }}"
|
||||
UPLOAD_FOLDER: "/app/uploads"
|
||||
OVERPASS_API_URL: "{{ wanderer_env.overpass_api_url }}"
|
||||
VALHALLA_URL: "{{ wanderer_env.valhalla_url }}"
|
||||
NOMINATIM_URL: "{{ wanderer_env.nominatim_url }}"
|
||||
PUBLIC_MAP_MAX_POLYLINES: "{{ wanderer_env.public_map_max_polylines }}"
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: db
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
replicas: {{ wanderer_replica_count.db }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: db
|
||||
spec:
|
||||
containers:
|
||||
- name: db
|
||||
image: "{{ wanderer_images.db }}"
|
||||
ports:
|
||||
- containerPort: 8090
|
||||
env:
|
||||
- name: MEILI_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: MEILI_URL
|
||||
- name: MEILI_MASTER_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wanderer-secrets
|
||||
key: MEILI_MASTER_KEY
|
||||
- name: POCKETBASE_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wanderer-secrets
|
||||
key: POCKETBASE_ENCRYPTION_KEY
|
||||
- name: ORIGIN
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: ORIGIN
|
||||
volumeMounts:
|
||||
- name: pb-data
|
||||
mountPath: /pb_data
|
||||
- name: plugins
|
||||
mountPath: /data/plugins
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8090
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8090
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
volumes:
|
||||
- name: pb-data
|
||||
persistentVolumeClaim:
|
||||
claimName: wanderer-db-data
|
||||
- name: plugins
|
||||
persistentVolumeClaim:
|
||||
claimName: wanderer-db-plugins
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: db
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
type: {{ wanderer_db_service_type }}
|
||||
selector:
|
||||
app: db
|
||||
ports:
|
||||
- port: 8090
|
||||
targetPort: 8090
|
||||
protocol: TCP
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: wanderer
|
||||
namespace: {{ wanderer_namespace }}
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: ca-issuer
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ wanderer_host }}
|
||||
secretName: wanderer-tls
|
||||
rules:
|
||||
- host: {{ wanderer_host }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: web
|
||||
port:
|
||||
number: 3000
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ wanderer_namespace }}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: search
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
replicas: {{ wanderer_replica_count.search }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: search
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: search
|
||||
spec:
|
||||
containers:
|
||||
- name: search
|
||||
image: "{{ wanderer_images.search }}"
|
||||
ports:
|
||||
- containerPort: 7700
|
||||
env:
|
||||
- name: MEILI_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: MEILI_URL
|
||||
- name: MEILI_MASTER_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wanderer-secrets
|
||||
key: MEILI_MASTER_KEY
|
||||
- name: MEILI_NO_ANALYTICS
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- name: search-data
|
||||
mountPath: /meili_data
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 7700
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 7700
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
volumes:
|
||||
- name: search-data
|
||||
persistentVolumeClaim:
|
||||
claimName: wanderer-search-data
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: search
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
type: {{ wanderer_search_service_type }}
|
||||
selector:
|
||||
app: search
|
||||
ports:
|
||||
- port: 7700
|
||||
targetPort: 7700
|
||||
protocol: TCP
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: wanderer-secrets
|
||||
namespace: {{ wanderer_namespace }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
MEILI_MASTER_KEY: "{{ wanderer_env.meili_master_key }}"
|
||||
POCKETBASE_ENCRYPTION_KEY: "{{ wanderer_env.pocketbase_encryption_key }}"
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: web
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
replicas: {{ wanderer_replica_count.web }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: web
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: "{{ wanderer_images.web }}"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: MEILI_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: MEILI_URL
|
||||
- name: MEILI_MASTER_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wanderer-secrets
|
||||
key: MEILI_MASTER_KEY
|
||||
- name: ORIGIN
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: ORIGIN
|
||||
- name: BODY_SIZE_LIMIT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: BODY_SIZE_LIMIT
|
||||
- name: PUBLIC_POCKETBASE_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: PUBLIC_POCKETBASE_URL
|
||||
- name: PUBLIC_DISABLE_SIGNUP
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: PUBLIC_DISABLE_SIGNUP
|
||||
- name: UPLOAD_FOLDER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: UPLOAD_FOLDER
|
||||
- name: UPLOAD_USER
|
||||
value: "{{ wanderer_upload_user }}"
|
||||
- name: UPLOAD_PASSWORD
|
||||
value: "{{ wanderer_upload_password }}"
|
||||
- name: OVERPASS_API_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: OVERPASS_API_URL
|
||||
- name: VALHALLA_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: VALHALLA_URL
|
||||
- name: NOMINATIM_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: NOMINATIM_URL
|
||||
- name: PUBLIC_MAP_MAX_POLYLINES
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: wanderer-config
|
||||
key: PUBLIC_MAP_MAX_POLYLINES
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: /app/uploads
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 10
|
||||
volumes:
|
||||
- name: uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: wanderer-web-uploads
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: web
|
||||
namespace: {{ wanderer_namespace }}
|
||||
spec:
|
||||
type: {{ wanderer_service_type }}
|
||||
selector:
|
||||
app: web
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: 3000
|
||||
protocol: TCP
|
||||
|
||||
Reference in New Issue
Block a user