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>
This commit is contained in:
@@ -30,23 +30,9 @@ spec:
|
||||
serviceAccountName: {{ include "helm-osrm-backend.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.initContainer.enabled }}
|
||||
initContainers:
|
||||
- name: osrm-download
|
||||
image: busybox
|
||||
command: [ "sh", "-c" ]
|
||||
args:
|
||||
- wget -O /data/{{ .Values.initContainer.fileName }} {{ .Values.initContainer.url }};
|
||||
volumeMounts:
|
||||
- name: osrm-data
|
||||
mountPath: {{ .Values.volume.mountPath }}
|
||||
- name: osrm-init
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
command: {{ .Values.initContainer.command | toYaml | nindent 10 }}
|
||||
volumeMounts:
|
||||
- name: osrm-data
|
||||
mountPath: {{ .Values.volume.mountPath }}
|
||||
{{- end }}
|
||||
# NOTE: No init containers. OSRM routing data (map.osrm.*) is built OUTSIDE the
|
||||
# cluster (osrm-extract/partition/customize) and loaded onto the PVC directly.
|
||||
# In-cluster extraction was removed: it peaks ~4GB+ RAM and OOM-kills on restart.
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
|
||||
Reference in New Issue
Block a user