Skip to content

Commit

Permalink
add init flag for OSRM
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioan Damian committed Jan 25, 2021
1 parent 24f92c1 commit e2b415b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/nominatim/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: nominatim
description: Helm chart for Nominatim
type: application
version: 0.0.5
appVersion: "3.4"
version: 0.0.6
appVersion: "3.5"
keywords:
- maps
- nominatim
Expand Down
4 changes: 2 additions & 2 deletions charts/nominatim/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ spec:
- /bin/bash
- -c
args:
- apt update &&
apt install wget &&
- apt-get update &&
apt-get -y install wget &&
cd /data &&
wget http://download.geofabrik.de/europe/romania-latest.osm.pbf &&
cd $OLDPWD &&
Expand Down
6 changes: 3 additions & 3 deletions charts/nominatim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ serviceAccount:

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 101
podSecurityContext:
fsGroup: 101

securityContext:
# capabilities:
Expand All @@ -40,7 +40,7 @@ securityContext:
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 101
fsGroup: 101
# fsGroup: 101


service:
Expand Down
2 changes: 1 addition & 1 deletion charts/osrm-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: osrm-backend
description: Helm chart for Open Source Routing Machine
type: application
version: 0.0.3
version: 0.0.4
appVersion: "v5.23.0"
keywords:
- maps
Expand Down
14 changes: 14 additions & 0 deletions charts/osrm-backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
{{- if .Values.initNominatim }}
- /bin/bash
- -c
args:
- apt-get update &&
apt-get -y install wget &&
cd /data &&
wget http://download.geofabrik.de/europe/romania-latest.osm.pbf &&
cd $OLDPWD &&
osrm-extract -p /opt/car.lua /data/romania-latest.osrm &&
osrm-partition /data/romania-latest.osrm &&
osrm-customize /data/romania-latest.osrm &&
rm -rf /data/romania-latest.osm.pbf
{{- else }}
- osrm-routed
- --algorithm
- mld
Expand Down
3 changes: 3 additions & 0 deletions charts/osrm-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ fullnameOverride: ""
mapName: ""
containerPort: 5000

# Set to true if you want to initialize the OSRM files
initOsrm: false

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit e2b415b

Please sign in to comment.