@@ -9,53 +9,42 @@ metadata:
9
9
environment : {{ .Values.environment }}
10
10
release : {{ .Release.Name }}
11
11
annotations :
12
+ {{- if eq .Values.serviceType "ClusterIP" }}
13
+ kubernetes.io/ingress.class : nginx
14
+ cert-manager.io/cluster-issuer : letsencrypt-prod-issuer
15
+ {{- end }}
12
16
{{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
13
17
service.beta.kubernetes.io/aws-load-balancer-ssl-cert : {{ .Values.AWS_SSL_ARN }}
14
18
service.beta.kubernetes.io/aws-load-balancer-backend-protocol : http
15
19
service.beta.kubernetes.io/aws-load-balancer-ssl-ports : https
16
20
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout : " 600"
17
21
{{- 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 }}
24
22
{{- with .Values.tilerServer.serviceAnnotations }}
25
23
{{- toYaml . | nindent 4 }}
26
24
{{- end }}
27
25
spec :
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 }}
34
28
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" }}
40
32
protocol : TCP
41
- name : https
42
- targetPort : {{ .Values.tilerServer.externalService.port }}
43
33
{{- else }}
44
- # normal (internal) service
34
+ # This is the default service, atached to the deployment
35
+ type : {{ default "ClusterIP" .Values.serviceType }}
45
36
ports :
46
- - port : 80
47
- targetPort : http
37
+ - name : http
38
+ port : 80
48
39
protocol : TCP
49
- name : http
50
- {{- if and (eq .Values.serviceType "LoadBalancer") .Values.AWS_SSL_ARN }}
51
- - port : 443
52
40
targetPort : http
41
+ - name : https
42
+ port : 443
53
43
protocol : TCP
54
- name : https
55
- {{- end }}
44
+ targetPort : http
56
45
selector :
57
46
app : {{ template "osm-seed.name" . }}
58
47
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
60
49
{{- end }}
61
50
{{- end }}
0 commit comments