File tree Expand file tree Collapse file tree 11 files changed +108
-30
lines changed Expand file tree Collapse file tree 11 files changed +108
-30
lines changed Original file line number Diff line number Diff line change
1
+ {{- if and .Values.nominatimApi.enabled .Values.nominatimApi.externalService.enabled }}
2
+ apiVersion : v1
3
+ kind : Endpoints
4
+ metadata :
5
+ name : {{ .Release.Name }}-nominatim-api
6
+ namespace : {{ .Release.Namespace }}
7
+ labels :
8
+ app : {{ template "osm-seed.name" . }}
9
+ component : nominatim-api-endpoints
10
+ environment : {{ .Values.environment }}
11
+ release : {{ .Release.Name }}
12
+ subsets :
13
+ - addresses :
14
+ - ip : {{ .Values.nominatimApi.externalService.ip }}
15
+ ports :
16
+ - name : http
17
+ port : {{ .Values.nominatimApi.externalService.port }}
18
+ protocol : TCP
19
+ {{- end }}
20
+ ---
21
+ {{- if and .Values.nominatimUI.enabled .Values.nominatimUI.externalService.enabled }}
22
+ apiVersion : v1
23
+ kind : Endpoints
24
+ metadata :
25
+ name : {{ .Release.Name }}-nominatim-ui
26
+ namespace : {{ .Release.Namespace }}
27
+ labels :
28
+ app : {{ template "osm-seed.name" . }}
29
+ component : nominatim-ui-endpoints
30
+ environment : {{ .Values.environment }}
31
+ release : {{ .Release.Name }}
32
+ subsets :
33
+ - addresses :
34
+ - ip : {{ .Values.nominatimUI.externalService.ip }}
35
+ ports :
36
+ - name : http
37
+ port : {{ .Values.nominatimUI.externalService.port }}
38
+ protocol : TCP
39
+ {{- end }}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ metadata:
7
7
kubernetes.io/ingress.class : nginx
8
8
cert-manager.io/cluster-issuer : letsencrypt-prod-issuer
9
9
nginx.ingress.kubernetes.io/proxy-body-size : 5m
10
+ nginx.ingress.kubernetes.io/use-regex : " true"
10
11
spec :
11
12
ingressClassName : nginx
12
13
tls :
23
24
{{- if .Values.nominatimUI.enabled }}
24
25
paths :
25
26
# Routes to the API
26
- - path : /search.php
27
- pathType : ImplementationSpecific
28
- backend :
29
- service :
30
- name : {{ .Release.Name }}-nominatim-api
31
- port :
32
- number : 80
33
- - path : /reverse.php
34
- pathType : ImplementationSpecific
35
- backend :
36
- service :
37
- name : {{ .Release.Name }}-nominatim-api
38
- port :
39
- number : 80
40
- - path : /status.php
27
+ - path : /((?:search|reverse|lookup|status|deletable|polygons|details)(?:\.php)?)
41
28
pathType : ImplementationSpecific
42
29
backend :
43
30
service :
62
49
port :
63
50
number : 80
64
51
{{- end }}
65
- {{- end }}
52
+ {{- end }}
Original file line number Diff line number Diff line change 1
- {{- if .Values.nominatimApi.enabled - }}
1
+ {{- if and .Values.nominatimApi.enabled (not .Values.nominatimApi.externalService.enabled) }}
2
2
{{- if .Values.nominatimApi.persistenceDisk.enabled -}}
3
3
apiVersion : v1
4
4
kind : PersistentVolume
82
82
storage : {{ .Values.nominatimApi.persistenceDisk.GCP_gcePersistentDisk_size }}
83
83
{{- end }}
84
84
{{- end }}
85
- {{- end }}
85
+ {{- end }}
Original file line number Diff line number Diff line change @@ -24,16 +24,25 @@ metadata:
24
24
{{- toYaml . | nindent 4 }}
25
25
{{- end }}
26
26
spec :
27
+ {{- if and .Values.nominatimApi.enabled .Values.nominatimApi.externalService.enabled }}
28
+ # External service (no selector)
29
+ ports :
30
+ - name : http
31
+ port : 80
32
+ targetPort : {{ .Values.nominatimApi.externalService.port | default "80" }}
33
+ protocol : TCP
34
+ {{- else }}
35
+ # Internal service
27
36
type : {{ .Values.serviceType }}
28
37
ports :
29
38
- port : 80
30
39
protocol : TCP
31
40
name : http
32
41
targetPort : api
33
- - port : 5432
34
- protocol : TCP
35
- name : postgres
36
- targetPort : postgres
42
+ # - port: 5432
43
+ # protocol: TCP
44
+ # name: postgres
45
+ # targetPort: postgres
37
46
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
38
47
- port : 443
39
48
protocol : TCP
44
53
app : {{ template "osm-seed.name" . }}
45
54
release : {{ .Release.Name }}
46
55
run : {{ .Release.Name }}-nominatim
56
+ {{- end }}
47
57
{{- end }}
48
58
---
49
59
{{- if and .Values.nominatimApi.enabled .Values.nominatimUI.enabled }}
@@ -57,6 +67,15 @@ metadata:
57
67
environment : {{ .Values.environment }}
58
68
release : {{ .Release.Name }}
59
69
spec :
70
+ {{- if and .Values.nominatimUI.enabled .Values.nominatimUI.externalService.enabled }}
71
+ # External service (no selector)
72
+ ports :
73
+ - name : http
74
+ port : 80
75
+ targetPort : {{ .Values.nominatimUI.externalService.port | default "80" }}
76
+ protocol : TCP
77
+ {{- else }}
78
+ # Internal service
60
79
type : ClusterIP
61
80
ports :
62
81
- port : 80
67
86
app : {{ template "osm-seed.name" . }}
68
87
release : {{ .Release.Name }}
69
88
run : {{ .Release.Name }}-nominatim
89
+ {{- end }}
70
90
{{- end }}
Original file line number Diff line number Diff line change 1
- {{- if .Values.nominatimApi.enabled - }}
1
+ {{- if and .Values.nominatimApi.enabled (not .Values.nominatimApi.externalService.enabled) }}
2
2
apiVersion : apps/v1
3
3
kind : StatefulSet
4
4
metadata :
Original file line number Diff line number Diff line change 1
- {{- if .Values.overpassApi.enabled - }}
1
+ {{- if and .Values.overpassApi.enabled (not .Values.overpassApi.externalService.enabled) }}
2
2
{{- if .Values.overpassApi.persistenceDisk.enabled -}}
3
3
apiVersion : v1
4
4
kind : PersistentVolume
Original file line number Diff line number Diff line change
1
+ {{- if and .Values.overpassApi.enabled .Values.overpassApi.externalService.enabled }}
2
+ apiVersion : v1
3
+ kind : Endpoints
4
+ metadata :
5
+ name : {{ .Release.Name }}-overpass-api
6
+ namespace : {{ .Release.Namespace }}
7
+ labels :
8
+ app : {{ template "osm-seed.name" . }}
9
+ component : overpass-api-endpoints
10
+ environment : {{ .Values.environment }}
11
+ release : {{ .Release.Name }}
12
+ subsets :
13
+ - addresses :
14
+ - ip : {{ .Values.overpassApi.externalService.ip }}
15
+ ports :
16
+ - name : http
17
+ port : {{ .Values.overpassApi.externalService.port }}
18
+ protocol : TCP
19
+ {{- end }}
Original file line number Diff line number Diff line change 28
28
pathType : Prefix
29
29
backend :
30
30
service :
31
- name : {{ template "osm-seed.fullname" . }}-overpass-api
31
+ name : {{ .Release.Name }}-overpass-api
32
32
port :
33
33
number : 80
34
- {{- end }}
34
+ {{- end }}
Original file line number Diff line number Diff line change 2
2
apiVersion : v1
3
3
kind : Service
4
4
metadata :
5
- name : {{ template "osm-seed.fullname" . }}-overpass-api
5
+ name : {{ .Release.Name }}-overpass-api
6
6
labels :
7
7
app : {{ template "osm-seed.name" . }}
8
8
component : overpass-api-service
@@ -24,6 +24,15 @@ metadata:
24
24
{{- toYaml . | nindent 4 }}
25
25
{{- end }}
26
26
spec :
27
+ {{- if and .Values.overpassApi.enabled .Values.overpassApi.externalService.enabled }}
28
+ # External service (no selector)
29
+ ports :
30
+ - name : http
31
+ port : 80
32
+ targetPort : {{ .Values.overpassApi.externalService.port | default "80" }}
33
+ protocol : TCP
34
+ {{- else }}
35
+ # Internal service
27
36
type : {{ .Values.serviceType }}
28
37
ports :
29
38
- port : 80
36
45
protocol : TCP
37
46
name : https
38
47
{{- end }}
39
-
40
48
selector :
41
49
app : {{ template "osm-seed.name" . }}
42
50
release : {{ .Release.Name }}
43
51
run : {{ .Release.Name }}-overpass-api
44
- {{- end }}
52
+ {{- end }}
53
+ {{- end }}
Original file line number Diff line number Diff line change 1
- {{- if .Values.overpassApi.enabled - }}
1
+ {{- if and .Values.overpassApi.enabled (not .Values.overpassApi.externalService.enabled) }}
2
2
apiVersion : apps/v1
3
3
kind : StatefulSet
4
4
metadata :
You can’t perform that action at this time.
0 commit comments