File tree Expand file tree Collapse file tree 5 files changed +67
-8
lines changed
osm-seed/templates/nominatim-api Expand file tree Collapse file tree 5 files changed +67
-8
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 62
62
port :
63
63
number : 80
64
64
{{- end }}
65
- {{- end }}
65
+ {{- 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 :
You can’t perform that action at this time.
0 commit comments