Go to file
Mathias Beaulieu-Duncan 8576172bb4 Remove in-cluster data processing; serve pre-built OSRM data from PVC
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>
2026-06-03 17:11:04 -04:00
templates Remove in-cluster data processing; serve pre-built OSRM data from PVC 2026-06-03 17:11:04 -04:00
.gitignore initial commit 2025-02-18 14:39:05 -05:00
.helmignore initial commit 2025-02-18 14:39:05 -05:00
Chart.yaml Remove in-cluster data processing; serve pre-built OSRM data from PVC 2026-06-03 17:11:04 -04:00
readme.md initial commit 2025-02-18 14:39:05 -05:00
values.override.example.yaml initial commit 2025-02-18 14:39:05 -05:00
values.yaml Remove in-cluster data processing; serve pre-built OSRM data from PVC 2026-06-03 17:11:04 -04:00

Helm Chart

Limitation

osrm-extract use allot of memory and if it doesn't have enough the init container will crash and the deployment will fail. Depending on the dataset you are using make sure your pod has enough memory to process the freshly new data it's pulling on deployment.

Configuration

Configure your ingress, PVC and settings depending on the dataset you need. Configuring your PVC with a delete claim policy is recommended if you want to pull the latest dataset when you deploy a new version. Configuring cors origins to your apps is suggested if you want to avoid the public using your resources.

Copy the values.override.example.yaml file and rename it to values.override.yaml It's preferable using the values.override.yaml so you can always pull a future version of the chart without overriding your configuration.

Debug

helm template osrm-backend .

Install

helm install osrm-backend . -f values.override.yaml -n osrm

Warning! Currently upgrading is not working properly because the new pod tries to attach to the same PVC as the current container. This need to be improved!

Update

helm upgrade osrm-backend . -f values.override.yaml -n osrm

Uninstall

helm uninstall osrm-backend -n osrm

check init containers status

kubectl logs <pod-id> -c <container-name> -n osrm -f

default init containers

osrm-download
osrm-init

check logs of the running pod

kubectl logs <pod-id> -n osrm -f

Improvements

  • Allow multiple init container configuration to process multiple .osm.pbf files
  • Make PVC Dynamic per release to allow upgrading the helm chart (this also make sure to pull the latest datasets)