@@ -9,53 +9,42 @@ metadata:
99 environment : {{ .Values.environment }}
1010 release : {{ .Release.Name }}
1111 annotations :
12+ {{- if eq .Values.serviceType "ClusterIP" }}
13+ kubernetes.io/ingress.class : nginx
14+ cert-manager.io/cluster-issuer : letsencrypt-prod-issuer
15+ {{- end }}
1216 {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
1317 service.beta.kubernetes.io/aws-load-balancer-ssl-cert : {{ .Values.AWS_SSL_ARN }}
1418 service.beta.kubernetes.io/aws-load-balancer-backend-protocol : http
1519 service.beta.kubernetes.io/aws-load-balancer-ssl-ports : https
1620 service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout : " 600"
1721 {{- end }}
18- {{- if eq .Values.serviceType "ClusterIP" }}
19- kubernetes.io/ingress.class : nginx
20- cert-manager.io/cluster-issuer : letsencrypt-prod-issuer
21- {{- else }}
22- fake.annotation : fake
23- {{- end }}
2422 {{- with .Values.tilerServer.serviceAnnotations }}
2523 {{- toYaml . | nindent 4 }}
2624 {{- end }}
2725spec :
28- # If tilerServer.externalService.enabled = true, we use ExternalName; otherwise use user-defined serviceType
29- type : {{- if .Values.tilerServer.externalService.enabled }} ExternalName {{- else }} {{ .Values.serviceType }} {{- end }}
30-
31- {{- if .Values.tilerServer.externalService.enabled }}
32- # external name service
33- externalName : " {{ .Values.tilerServer.externalService.ip }}"
26+ # This is a workaround for the issue with the external service
27+ {{- if and .Values.tilerServer.enabled .Values.tilerServer.externalService.enabled }}
3428 ports :
35- - port : 80
36- protocol : TCP
37- name : http
38- targetPort : {{ .Values.tilerServer.externalService.port }}
39- - port : 443
29+ - name : http
30+ port : 80
31+ targetPort : {{ .Values.tilerServer.externalService.port | default "9090" }}
4032 protocol : TCP
41- name : https
42- targetPort : {{ .Values.tilerServer.externalService.port }}
4333 {{- else }}
44- # normal (internal) service
34+ # This is the default service, atached to the deployment
35+ type : {{ default "ClusterIP" .Values.serviceType }}
4536 ports :
46- - port : 80
47- targetPort : http
37+ - name : http
38+ port : 80
4839 protocol : TCP
49- name : http
50- {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
51- - port : 443
5240 targetPort : http
41+ - name : https
42+ port : 443
5343 protocol : TCP
54- name : https
55- {{- end }}
44+ targetPort : http
5645 selector :
5746 app : {{ template "osm-seed.name" . }}
5847 release : {{ .Release.Name }}
59- run : {{ .Release.Name }}-tiler-server
48+ run : {{ .Release.Name }}-tiler-server # This is working for deployment and not for statefulset , make sure you use "s3" to storage the vtiles
6049 {{- end }}
6150{{- end }}
0 commit comments