Skip to content

Commit bb88549

Browse files
authored
[nominatim][bugfix] User agent for initJob curl, handle non-success response (#46)
1 parent e8c3a87 commit bb88549

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

charts/nominatim/Chart.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 3.5.0
18+
version: 3.6.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
@@ -31,3 +31,6 @@ dependencies:
3131
version: 11.6.20
3232
repository: https://charts.bitnami.com/bitnami
3333
condition: postgresql.enabled
34+
35+
annotations:
36+
repository: robjuz/helm-charts

charts/nominatim/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,10 @@ pgsql:host={{ include "nominatim.databaseHost" . }};port={{ include "nominatim.d
128128
{{- define "nominatim.uiUrl" -}}
129129
{{- printf "https://github.com/osm-search/nominatim-ui/releases/download/v%s/nominatim-ui-%s.tar.gz" .Values.nominatimUi.version .Values.nominatimUi.version }}
130130
{{- end }}
131+
132+
{{/*
133+
Create user agent string for curl
134+
*/}}
135+
{{- define "chart.userAgent" -}}
136+
{{- printf "%s/%s:%s" .Chart.Annotations.Repository .Chart.Name .Chart.Version }}
137+
{{- end }}

charts/nominatim/templates/initJob.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ spec:
2525
name: data
2626
command:
2727
- curl
28+
- -A {{ include "chart.userAgent" . }}
2829
- {{ .Values.nominatimInitialize.customStyleUrl }}
2930
- -L
31+
- -f
3032
- -o
3133
- custom.style
3234
{{- end }}
@@ -40,8 +42,10 @@ spec:
4042
name: data
4143
command:
4244
- curl
45+
- -A {{ include "chart.userAgent" . }}
4346
- {{ .Values.nominatimInitialize.wikipediaUrl }}
4447
- -L
48+
- -f
4549
- -o
4650
- wikimedia-importance.sql.gz
4751
{{- end }}
@@ -55,8 +59,10 @@ spec:
5559
name: data
5660
command:
5761
- curl
62+
- -A {{ include "chart.userAgent" . }}
5863
- https://www.nominatim.org/data/gb_postcodes.csv.gz
5964
- -L
65+
- -f
6066
- -o
6167
- gb_postcodes.csv.gz
6268
{{- end }}
@@ -70,8 +76,10 @@ spec:
7076
name: data
7177
command:
7278
- curl
79+
- -A {{ include "chart.userAgent" . }}
7380
- https://www.nominatim.org/data/us_postcodes.csv.gz
7481
- -L
82+
- -f
7583
- -o
7684
- us_postcodes.csv.gz
7785
{{- end }}
@@ -84,9 +92,11 @@ spec:
8492
name: data
8593
command:
8694
- curl
87-
- -L
95+
- -A {{ include "chart.userAgent" . }}
8896
- {{ .Values.nominatimInitialize.pbfUrl }}
8997
- --create-dirs
98+
- -L
99+
- -f
90100
- -o
91101
- data.osm.pbf
92102

0 commit comments

Comments
 (0)