File tree Expand file tree Collapse file tree 3 files changed +61
-3
lines changed Expand file tree Collapse file tree 3 files changed +61
-3
lines changed Original file line number Diff line number Diff line change 1
1
{{- $coordinatorJmx := merge .Values.jmx.coordinator (omit .Values.jmx "coordinator" "worker") -}}
2
+ {{- $coordinatorSvcSpecOverride := index .Values.coordinator.service "spec" | default dict -}}
3
+ {{- $coordinatorSvcAnnotations := deepCopy .Values.service.annotations | merge (index .Values.coordinator.service "annotations" | default dict) -}}
2
4
apiVersion : v1
3
5
kind : Service
4
6
metadata :
@@ -8,9 +10,17 @@ metadata:
8
10
{{- include "trino.labels" . | nindent 4 }}
9
11
app.kubernetes.io/component : coordinator
10
12
annotations :
11
- {{- toYaml .Values.service.annotations | nindent 4 }}
13
+ {{- toYaml $coordinatorSvcAnnotations | nindent 4 }}
12
14
spec :
13
- type : {{ .Values.service.type }}
15
+ {{- if gt (len $coordinatorSvcSpecOverride) 0 }}
16
+ {{- toYaml $coordinatorSvcSpecOverride | nindent 2 }}
17
+ {{- end }}
18
+
19
+ {{- if not (hasKey $coordinatorSvcSpecOverride "type") }}
20
+ type : {{ default .Values.service.type }}
21
+ {{- end }}
22
+
23
+ {{- if not (hasKey $coordinatorSvcSpecOverride "ports") }}
14
24
ports :
15
25
- port : {{ .Values.service.port }}
16
26
targetPort : http
43
53
nodePort : {{ $value.nodePort }}
44
54
{{- end }}
45
55
{{- end }}
56
+ {{- end }}
57
+
58
+ {{- if not (hasKey $coordinatorSvcSpecOverride "selector") }}
46
59
selector :
47
60
{{- include "trino.selectorLabels" . | nindent 4 }}
48
61
app.kubernetes.io/component : coordinator
62
+ {{- end }}
Original file line number Diff line number Diff line change 1
1
{{- $workerJmx := merge .Values.jmx.worker (omit .Values.jmx "coordinator" "worker") -}}
2
+ {{- $workerSvcSpecOverride := index .Values.worker.service "spec" | default dict -}}
3
+ {{- $workerSvcAnnotations := deepCopy .Values.service.annotations | merge (index .Values.worker.service "annotations" | default dict) -}}
4
+ {{- $workerSvcIsLoadBalancer := eq (index $workerSvcSpecOverride "type" | default "") "LoadBalancer" -}}
2
5
apiVersion : v1
3
6
kind : Service
4
7
metadata :
@@ -8,9 +11,17 @@ metadata:
8
11
{{- include "trino.labels" . | nindent 4 }}
9
12
app.kubernetes.io/component : worker
10
13
annotations :
11
- {{- toYaml .Values.service.annotations | nindent 4 }}
14
+ {{- toYaml $workerSvcAnnotations | nindent 4 }}
12
15
spec :
16
+ {{- if gt (len $workerSvcSpecOverride) 0 }}
17
+ {{- toYaml $workerSvcSpecOverride | nindent 2 }}
18
+ {{- end }}
19
+
20
+ {{- if not $workerSvcIsLoadBalancer }}
13
21
clusterIP : None
22
+ {{- end }}
23
+
24
+ {{- if not (hasKey $workerSvcSpecOverride "ports") }}
14
25
ports :
15
26
- port : {{ .Values.service.port }}
16
27
targetPort : http
31
42
nodePort : {{ $value.nodePort }}
32
43
{{- end }}
33
44
{{- end }}
45
+ {{- end }}
46
+
47
+ {{- if not (hasKey $workerSvcSpecOverride "selector") }}
34
48
selector :
35
49
{{- include "trino.selectorLabels" . | nindent 4 }}
36
50
app.kubernetes.io/component : worker
51
+ {{- end }}
Original file line number Diff line number Diff line change @@ -550,6 +550,21 @@ secretMounts: []
550
550
# ```
551
551
552
552
coordinator :
553
+ service : {}
554
+ # coordinator.service -- Service overrides just for the coordinator service. It is merged with the root-level service specification. Beware that specifying spec.ports will override the dynamically generated ports for JMX exporter as well as the additionalExposedPorts.
555
+ # @raw
556
+ # Example:
557
+ # ```yaml
558
+ # annotations:
559
+ # external-dns.alpha.kubernetes.io/hostname: trino.example.com
560
+ # spec:
561
+ # type: LoadBalancer
562
+ # externalTrafficPolicy: Local
563
+ # loadBalancerSourceRanges:
564
+ # - 1.2.3.4/32
565
+ # - 10.0.0.0/8
566
+ # ```
567
+
553
568
deployment :
554
569
annotations : {}
555
570
progressDeadlineSeconds : 600
@@ -735,6 +750,20 @@ coordinator:
735
750
# ```
736
751
737
752
worker :
753
+ service : {}
754
+ # worker.service -- Service overrides just for the worker service. It is merged with the root-level service specification. Beware that specifying spec.ports will override the dynamically generated ports for JMX exporter as well as the additionalExposedPorts.
755
+ # @raw
756
+ # Example:
757
+ # ```yaml
758
+ # annotations:
759
+ # external-dns.alpha.kubernetes.io/hostname: trino-workers.example.com
760
+ # spec:
761
+ # type: LoadBalancer
762
+ # externalTrafficPolicy: Local
763
+ # loadBalancerSourceRanges:
764
+ # - 1.2.3.4/32
765
+ # - 10.0.0.0/8
766
+ # ```
738
767
deployment :
739
768
annotations : {}
740
769
progressDeadlineSeconds : 600
You can’t perform that action at this time.
0 commit comments