The init containers downloaded the OSM extract and ran osrm-extract/partition/customize on every pod start. extract peaks ~4GB+ RAM, which OOM-kills on the 4GB nodes whenever the pod restarts (it only survived 306 days by never restarting). Removed both init containers. Routing data (map.osrm.*) is now built OUTSIDE the cluster and loaded onto the PVC directly. Bumped chart to 0.2.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
image:
|
|
repository: ghcr.io/project-osrm/osrm-backend
|
|
pullPolicy: IfNotPresent
|
|
|
|
replicaCount: 1
|
|
|
|
autoscaling:
|
|
enabled: false
|
|
minReplicas: 1
|
|
maxReplicas: 100
|
|
targetCPUUtilizationPercentage: 80
|
|
# targetMemoryUtilizationPercentage: 80
|
|
|
|
serviceAccount:
|
|
create: true
|
|
automount: true
|
|
annotations: {}
|
|
name: ""
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 5000
|
|
|
|
volume:
|
|
mountPath: /data
|
|
# this will be probably different for you
|
|
storageClass: linode-block-storage
|
|
accessMode: ReadWriteOnce
|
|
# adjust the size you need depending on the dataset you need
|
|
size: 20Gi
|
|
existingClaim: ""
|
|
|
|
resources: {}
|
|
|
|
# Routing data (map.osrm.*) is built OUTSIDE the cluster and loaded onto the PVC.
|
|
# In-cluster extraction was removed (osrm-extract peaks ~4GB+ and OOM-kills on restart).
|
|
# To refresh the map: build locally with osrm-backend (extract -> partition -> customize),
|
|
# then copy map.osrm.* onto the volume (e.g. via a helper pod + kubectl cp).
|
|
|
|
command:
|
|
- "osrm-routed"
|
|
- "--algorithm"
|
|
- "mld"
|
|
- /data/map.osrm
|
|
|
|
# httpGet doesn't support status code 400 and there is no health check call on the osrm api
|
|
# I rather avoid making a real call which will use compute everytime the probes triggers
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- 'cat /proc/net/tcp | grep -i ":1388"'
|
|
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- sh
|
|
- -c
|
|
- 'cat /proc/net/tcp | grep -i ":1388"'
|
|
|
|
# important for init containers to give it times to download and extract the data
|
|
tolerations:
|
|
- key: "node.kubernetes.io/not-ready"
|
|
operator: "Exists"
|
|
effect: "NoExecute"
|
|
tolerationSeconds: 3600 # 60 minutes
|
|
|
|
- key: "node.kubernetes.io/unreachable"
|
|
operator: "Exists"
|
|
effect: "NoExecute"
|
|
tolerationSeconds: 3600 # 60 minutes
|