Skip to content

Commit 7957c21

Browse files
fredlegerguilload
andcommitted
feat: allow to customize nodeports
Co-authored-by: Adrien Guillo <[email protected]>
1 parent a4690a8 commit 7957c21

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
searcher:
2+
serviceType: NodePort
3+
restNodePort: 37280
4+
grpcNodePort: 37281
5+
6+
indexer:
7+
serviceType: NodePort
8+
restNodePort: 37283
9+
grpcNodePort: 37284
10+
11+
metastore:
12+
serviceType: NodePort
13+
restNodePort: 37285
14+
grpcNodePort: 37286
15+
16+
control_plane:
17+
serviceType: NodePort
18+
restNodePort: 37287
19+
grpcNodePort: 37288
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
service:
2+
type: NodePort

charts/quickwit/templates/service.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,17 @@ spec:
2424
targetPort: rest
2525
protocol: TCP
2626
name: rest
27+
{{- $type := .Values.indexer.serviceType | default .Values.service.type }}
28+
{{- if and (eq $type "NodePort") .Values.indexer.restNodePort }}
29+
nodePort: {{ .Values.indexer.restNodePort }}
30+
{{- end }}
2731
- port: 7281
2832
targetPort: grpc
2933
name: grpc
34+
{{- $type := .Values.searcher.serviceType | default .Values.service.type }}
35+
{{- if and (eq $type "NodePort") .Values.searcher.grpcNodePort }}
36+
nodePort: {{ .Values.searcher.grpcNodePort }}
37+
{{- end }}
3038
selector:
3139
{{- include "quickwit.searcher.selectorLabels" . | nindent 4 }}
3240
---
@@ -92,9 +100,15 @@ spec:
92100
targetPort: rest
93101
protocol: TCP
94102
name: rest
103+
{{- if and (or (eq (.Values.indexer.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.indexer.restNodePort }}
104+
nodePort: {{ .Values.indexer.restNodePort }}
105+
{{- end }}
95106
- port: 7281
96107
targetPort: grpc
97108
name: grpc
109+
{{- if and (or (eq (.Values.indexer.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.indexer.grpcNodePort }}
110+
nodePort: {{ .Values.indexer.grpcNodePort }}
111+
{{- end }}
98112
selector:
99113
{{- include "quickwit.indexer.selectorLabels" . | nindent 4 }}
100114
---
@@ -124,9 +138,15 @@ spec:
124138
targetPort: rest
125139
protocol: TCP
126140
name: rest
141+
{{- if and (or (eq (.Values.metastore.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.metastore.restNodePort }}
142+
nodePort: {{ .Values.metastore.restNodePort }}
143+
{{- end }}
127144
- port: 7281
128145
targetPort: grpc
129146
name: grpc
147+
{{- if and (or (eq (.Values.metastore.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.metastore.grpcNodePort }}
148+
nodePort: {{ .Values.metastore.grpcNodePort }}
149+
{{- end }}
130150
selector:
131151
{{- include "quickwit.metastore.selectorLabels" . | nindent 4 }}
132152
---
@@ -156,9 +176,15 @@ spec:
156176
targetPort: rest
157177
protocol: TCP
158178
name: rest
179+
{{- if and (or (eq (.Values.control_plane.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.control_plane.restNodePort }}
180+
nodePort: {{ .Values.control_plane.restNodePort }}
181+
{{- end }}
159182
- port: 7281
160183
targetPort: grpc
161184
name: grpc
185+
{{- if and (or (eq (.Values.control_plane.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.control_plane.grpcNodePort }}
186+
nodePort: {{ .Values.control_plane.grpcNodePort }}
187+
{{- end }}
162188
selector:
163189
{{- include "quickwit.control_plane.selectorLabels" . | nindent 4 }}
164190

0 commit comments

Comments
 (0)