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 11{{- $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) -}}
24apiVersion : v1
35kind : Service
46metadata :
@@ -8,9 +10,17 @@ metadata:
810 {{- include "trino.labels" . | nindent 4 }}
911 app.kubernetes.io/component : coordinator
1012 annotations :
11- {{- toYaml .Values.service.annotations | nindent 4 }}
13+ {{- toYaml $coordinatorSvcAnnotations | nindent 4 }}
1214spec :
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") }}
1424 ports :
1525 - port : {{ .Values.service.port }}
1626 targetPort : http
4353 nodePort : {{ $value.nodePort }}
4454 {{- end }}
4555 {{- end }}
56+ {{- end }}
57+
58+ {{- if not (hasKey $coordinatorSvcSpecOverride "selector") }}
4659 selector :
4760 {{- include "trino.selectorLabels" . | nindent 4 }}
4861 app.kubernetes.io/component : coordinator
62+ {{- end }}
Original file line number Diff line number Diff line change 11{{- $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" -}}
25apiVersion : v1
36kind : Service
47metadata :
@@ -8,9 +11,17 @@ metadata:
811 {{- include "trino.labels" . | nindent 4 }}
912 app.kubernetes.io/component : worker
1013 annotations :
11- {{- toYaml .Values.service.annotations | nindent 4 }}
14+ {{- toYaml $workerSvcAnnotations | nindent 4 }}
1215spec :
16+ {{- if gt (len $workerSvcSpecOverride) 0 }}
17+ {{- toYaml $workerSvcSpecOverride | nindent 2 }}
18+ {{- end }}
19+
20+ {{- if not $workerSvcIsLoadBalancer }}
1321 clusterIP : None
22+ {{- end }}
23+
24+ {{- if not (hasKey $workerSvcSpecOverride "ports") }}
1425 ports :
1526 - port : {{ .Values.service.port }}
1627 targetPort : http
3142 nodePort : {{ $value.nodePort }}
3243 {{- end }}
3344 {{- end }}
45+ {{- end }}
46+
47+ {{- if not (hasKey $workerSvcSpecOverride "selector") }}
3448 selector :
3549 {{- include "trino.selectorLabels" . | nindent 4 }}
3650 app.kubernetes.io/component : worker
51+ {{- end }}
Original file line number Diff line number Diff line change @@ -550,6 +550,21 @@ secretMounts: []
550550# ```
551551
552552coordinator :
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+
553568 deployment :
554569 annotations : {}
555570 progressDeadlineSeconds : 600
@@ -735,6 +750,20 @@ coordinator:
735750 # ```
736751
737752worker :
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+ # ```
738767 deployment :
739768 annotations : {}
740769 progressDeadlineSeconds : 600
You can’t perform that action at this time.
0 commit comments