@@ -9,50 +9,27 @@ metadata:
99 environment : {{ .Values.environment }}
1010 release : {{ .Release.Name }}
1111 annotations :
12- {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
13- service.beta.kubernetes.io/aws-load-balancer-ssl-cert : {{ .Values.AWS_SSL_ARN }}
14- service.beta.kubernetes.io/aws-load-balancer-backend-protocol : http
15- service.beta.kubernetes.io/aws-load-balancer-ssl-ports : https
12+ # NLB
13+ {{- if eq .Values.ingressClassNameType "nlb" }}
14+ service.beta.kubernetes.io/aws-load-balancer-type : " nlb"
15+ service.beta.kubernetes.io/aws-load-balancer-nlb-target-type : " ip"
16+ service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout : " 300"
1617 {{- end }}
18+ # ClusterIP
1719 {{- if eq .Values.serviceType "ClusterIP" }}
1820 cert-manager.io/cluster-issuer : {{ .Release.Name }}-letsencrypt-prod-issuer
19- {{- else }}
20- fake.annotation : fake
21- {{- end }}
22- {{- with .Values.nominatimApi.serviceAnnotations }}
23- {{- toYaml . | nindent 4 }}
2421 {{- end }}
2522spec :
26- {{- if and .Values.nominatimApi.enabled .Values.nominatimApi.externalService.enabled }}
27- # External service (no selector)
28- ports :
29- - name : http
30- port : 80
31- targetPort : {{ .Values.nominatimApi.externalService.port | default "80" }}
32- protocol : TCP
33- {{- else }}
34- # Internal service
3523 type : {{ .Values.serviceType }}
3624 ports :
3725 - port : 80
3826 protocol : TCP
3927 name : http
4028 targetPort : api
41- # - port: 5432
42- # protocol: TCP
43- # name: postgres
44- # targetPort: postgres
45- {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
46- - port : 443
47- protocol : TCP
48- name : https
49- targetPort : apache
50- {{- end }}
5129 selector :
5230 app : {{ template "osm-seed.name" . }}
5331 release : {{ .Release.Name }}
5432 run : {{ .Release.Name }}-nominatim
55- {{- end }}
5633{{- end }}
5734---
5835{{- if and .Values.nominatimApi.enabled .Values.nominatimUI.enabled }}
@@ -66,15 +43,6 @@ metadata:
6643 environment : {{ .Values.environment }}
6744 release : {{ .Release.Name }}
6845spec :
69- {{- if and .Values.nominatimUI.enabled .Values.nominatimUI.externalService.enabled }}
70- # External service (no selector)
71- ports :
72- - name : http
73- port : 80
74- targetPort : {{ .Values.nominatimUI.externalService.port | default "80" }}
75- protocol : TCP
76- {{- else }}
77- # Internal service
7846 type : ClusterIP
7947 ports :
8048 - port : 80
8553 app : {{ template "osm-seed.name" . }}
8654 release : {{ .Release.Name }}
8755 run : {{ .Release.Name }}-nominatim
88- {{- end }}
8956{{- end }}
0 commit comments