From e2b415b94b6723721ea8f2da8c474f93e1648753 Mon Sep 17 00:00:00 2001 From: Ioan Damian Date: Mon, 25 Jan 2021 22:03:08 +0200 Subject: [PATCH 1/2] add init flag for OSRM --- charts/nominatim/Chart.yaml | 4 ++-- charts/nominatim/templates/deployment.yaml | 4 ++-- charts/nominatim/values.yaml | 6 +++--- charts/osrm-backend/Chart.yaml | 2 +- charts/osrm-backend/templates/deployment.yaml | 14 ++++++++++++++ charts/osrm-backend/values.yaml | 3 +++ 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/charts/nominatim/Chart.yaml b/charts/nominatim/Chart.yaml index 56b724a..fc6adf5 100644 --- a/charts/nominatim/Chart.yaml +++ b/charts/nominatim/Chart.yaml @@ -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 diff --git a/charts/nominatim/templates/deployment.yaml b/charts/nominatim/templates/deployment.yaml index 38d07f2..cf44331 100644 --- a/charts/nominatim/templates/deployment.yaml +++ b/charts/nominatim/templates/deployment.yaml @@ -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 && diff --git a/charts/nominatim/values.yaml b/charts/nominatim/values.yaml index 08cafcd..ffc3478 100644 --- a/charts/nominatim/values.yaml +++ b/charts/nominatim/values.yaml @@ -30,8 +30,8 @@ serviceAccount: podAnnotations: {} -podSecurityContext: {} - # fsGroup: 101 +podSecurityContext: + fsGroup: 101 securityContext: # capabilities: @@ -40,7 +40,7 @@ securityContext: # readOnlyRootFilesystem: true # runAsNonRoot: true # runAsUser: 101 - fsGroup: 101 + # fsGroup: 101 service: diff --git a/charts/osrm-backend/Chart.yaml b/charts/osrm-backend/Chart.yaml index 71cb3ea..a103d2f 100644 --- a/charts/osrm-backend/Chart.yaml +++ b/charts/osrm-backend/Chart.yaml @@ -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 diff --git a/charts/osrm-backend/templates/deployment.yaml b/charts/osrm-backend/templates/deployment.yaml index 71c6011..a61bf23 100644 --- a/charts/osrm-backend/templates/deployment.yaml +++ b/charts/osrm-backend/templates/deployment.yaml @@ -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 diff --git a/charts/osrm-backend/values.yaml b/charts/osrm-backend/values.yaml index 23467ed..ae77193 100644 --- a/charts/osrm-backend/values.yaml +++ b/charts/osrm-backend/values.yaml @@ -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 From 2ee8236edfba2fa23297b13131ad56ab1f7d7388 Mon Sep 17 00:00:00 2001 From: Ioan Damian Date: Mon, 25 Jan 2021 22:07:58 +0200 Subject: [PATCH 2/2] add init flag for OSRM --- charts/osrm-backend/templates/deployment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/osrm-backend/templates/deployment.yaml b/charts/osrm-backend/templates/deployment.yaml index a61bf23..e557028 100644 --- a/charts/osrm-backend/templates/deployment.yaml +++ b/charts/osrm-backend/templates/deployment.yaml @@ -56,6 +56,7 @@ spec: {{- else }} - /data/romania-latest.osrm {{- end }} + {{- end }} {{- if .Values.env }} env: {{ range $k, $v := .Values.env }}