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:
77 kubernetes.io/ingress.class : nginx
88 cert-manager.io/cluster-issuer : letsencrypt-prod-issuer
99 nginx.ingress.kubernetes.io/proxy-body-size : 5m
10+ nginx.ingress.kubernetes.io/use-regex : " true"
1011spec :
1112 ingressClassName : nginx
1213 tls :
2324 {{- if .Values.nominatimUI.enabled }}
2425 paths :
2526 # 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)?)
4128 pathType : ImplementationSpecific
4229 backend :
4330 service :
6249 port :
6350 number : 80
6451 {{- 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) }}
22{{- if .Values.nominatimApi.persistenceDisk.enabled -}}
33apiVersion : v1
44kind : PersistentVolume
8282 storage : {{ .Values.nominatimApi.persistenceDisk.GCP_gcePersistentDisk_size }}
8383 {{- end }}
8484{{- end }}
85- {{- end }}
85+ {{- end }}
Original file line number Diff line number Diff line change @@ -24,16 +24,25 @@ metadata:
2424 {{- toYaml . | nindent 4 }}
2525 {{- end }}
2626spec :
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
2736 type : {{ .Values.serviceType }}
2837 ports :
2938 - port : 80
3039 protocol : TCP
3140 name : http
3241 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
3746 {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
3847 - port : 443
3948 protocol : TCP
4453 app : {{ template "osm-seed.name" . }}
4554 release : {{ .Release.Name }}
4655 run : {{ .Release.Name }}-nominatim
56+ {{- end }}
4757{{- end }}
4858---
4959{{- if and .Values.nominatimApi.enabled .Values.nominatimUI.enabled }}
@@ -57,6 +67,15 @@ metadata:
5767 environment : {{ .Values.environment }}
5868 release : {{ .Release.Name }}
5969spec :
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
6079 type : ClusterIP
6180 ports :
6281 - port : 80
6786 app : {{ template "osm-seed.name" . }}
6887 release : {{ .Release.Name }}
6988 run : {{ .Release.Name }}-nominatim
89+ {{- end }}
7090{{- 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) }}
22apiVersion : apps/v1
33kind : StatefulSet
44metadata :
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) }}
22{{- if .Values.overpassApi.persistenceDisk.enabled -}}
33apiVersion : v1
44kind : 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 2828 pathType : Prefix
2929 backend :
3030 service :
31- name : {{ template "osm-seed.fullname" . }}-overpass-api
31+ name : {{ .Release.Name }}-overpass-api
3232 port :
3333 number : 80
34- {{- end }}
34+ {{- end }}
Original file line number Diff line number Diff line change 22apiVersion : v1
33kind : Service
44metadata :
5- name : {{ template "osm-seed.fullname" . }}-overpass-api
5+ name : {{ .Release.Name }}-overpass-api
66 labels :
77 app : {{ template "osm-seed.name" . }}
88 component : overpass-api-service
@@ -24,6 +24,15 @@ metadata:
2424 {{- toYaml . | nindent 4 }}
2525 {{- end }}
2626spec :
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
2736 type : {{ .Values.serviceType }}
2837 ports :
2938 - port : 80
3645 protocol : TCP
3746 name : https
3847 {{- end }}
39-
4048 selector :
4149 app : {{ template "osm-seed.name" . }}
4250 release : {{ .Release.Name }}
4351 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) }}
22apiVersion : apps/v1
33kind : StatefulSet
44metadata :
You can’t perform that action at this time.
0 commit comments