Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nominatim][bugfix] User agent for initJob curl, handle non-success response #46

Merged
merged 2 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion charts/nominatim/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.5.0
version: 3.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -31,3 +31,6 @@ dependencies:
version: 11.6.20
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled

annotations:
repository: robjuz/helm-charts
7 changes: 7 additions & 0 deletions charts/nominatim/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,10 @@ pgsql:host={{ include "nominatim.databaseHost" . }};port={{ include "nominatim.d
{{- define "nominatim.uiUrl" -}}
{{- printf "https://github.com/osm-search/nominatim-ui/releases/download/v%s/nominatim-ui-%s.tar.gz" .Values.nominatimUi.version .Values.nominatimUi.version }}
{{- end }}

{{/*
Create user agent string for curl
*/}}
{{- define "chart.userAgent" -}}
{{- printf "%s/%s:%s" .Chart.Annotations.Repository .Chart.Name .Chart.Version }}
{{- end }}
12 changes: 11 additions & 1 deletion charts/nominatim/templates/initJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ spec:
name: data
command:
- curl
- -A {{ include "chart.userAgent" . }}
- {{ .Values.nominatimInitialize.customStyleUrl }}
- -L
- -f
- -o
- custom.style
{{- end }}
Expand All @@ -40,8 +42,10 @@ spec:
name: data
command:
- curl
- -A {{ include "chart.userAgent" . }}
- {{ .Values.nominatimInitialize.wikipediaUrl }}
- -L
- -f
- -o
- wikimedia-importance.sql.gz
{{- end }}
Expand All @@ -55,8 +59,10 @@ spec:
name: data
command:
- curl
- -A {{ include "chart.userAgent" . }}
- https://www.nominatim.org/data/gb_postcodes.csv.gz
- -L
- -f
- -o
- gb_postcodes.csv.gz
{{- end }}
Expand All @@ -70,8 +76,10 @@ spec:
name: data
command:
- curl
- -A {{ include "chart.userAgent" . }}
- https://www.nominatim.org/data/us_postcodes.csv.gz
- -L
- -f
- -o
- us_postcodes.csv.gz
{{- end }}
Expand All @@ -84,9 +92,11 @@ spec:
name: data
command:
- curl
- -L
- -A {{ include "chart.userAgent" . }}
- {{ .Values.nominatimInitialize.pbfUrl }}
- --create-dirs
- -L
- -f
- -o
- data.osm.pbf

Expand Down