diff --git a/charts/quickwit/ci/nodePort-custom-values.yaml b/charts/quickwit/ci/nodePort-custom-values.yaml new file mode 100644 index 0000000..376a924 --- /dev/null +++ b/charts/quickwit/ci/nodePort-custom-values.yaml @@ -0,0 +1,19 @@ +searcher: + serviceType: NodePort + restNodePort: 37280 + grpcNodePort: 37281 + +indexer: + serviceType: NodePort + restNodePort: 37283 + grpcNodePort: 37284 + +metastore: + serviceType: NodePort + restNodePort: 37285 + grpcNodePort: 37286 + +control_plane: + serviceType: NodePort + restNodePort: 37287 + grpcNodePort: 37288 diff --git a/charts/quickwit/ci/nodePort-simple-values.yaml b/charts/quickwit/ci/nodePort-simple-values.yaml new file mode 100644 index 0000000..eb6ea65 --- /dev/null +++ b/charts/quickwit/ci/nodePort-simple-values.yaml @@ -0,0 +1,2 @@ +service: + type: NodePort diff --git a/charts/quickwit/templates/service.yaml b/charts/quickwit/templates/service.yaml index b6fb7ec..5e121ba 100644 --- a/charts/quickwit/templates/service.yaml +++ b/charts/quickwit/templates/service.yaml @@ -24,9 +24,17 @@ spec: targetPort: rest protocol: TCP name: rest + {{- $type := .Values.indexer.serviceType | default .Values.service.type }} + {{- if and (eq $type "NodePort") .Values.indexer.restNodePort }} + nodePort: {{ .Values.indexer.restNodePort }} + {{- end }} - port: 7281 targetPort: grpc name: grpc + {{- $type := .Values.searcher.serviceType | default .Values.service.type }} + {{- if and (eq $type "NodePort") .Values.searcher.grpcNodePort }} + nodePort: {{ .Values.searcher.grpcNodePort }} + {{- end }} selector: {{- include "quickwit.searcher.selectorLabels" . | nindent 4 }} --- @@ -92,9 +100,15 @@ spec: targetPort: rest protocol: TCP name: rest + {{- if and (or (eq (.Values.indexer.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.indexer.restNodePort }} + nodePort: {{ .Values.indexer.restNodePort }} + {{- end }} - port: 7281 targetPort: grpc name: grpc + {{- if and (or (eq (.Values.indexer.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.indexer.grpcNodePort }} + nodePort: {{ .Values.indexer.grpcNodePort }} + {{- end }} selector: {{- include "quickwit.indexer.selectorLabels" . | nindent 4 }} --- @@ -124,9 +138,15 @@ spec: targetPort: rest protocol: TCP name: rest + {{- if and (or (eq (.Values.metastore.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.metastore.restNodePort }} + nodePort: {{ .Values.metastore.restNodePort }} + {{- end }} - port: 7281 targetPort: grpc name: grpc + {{- if and (or (eq (.Values.metastore.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.metastore.grpcNodePort }} + nodePort: {{ .Values.metastore.grpcNodePort }} + {{- end }} selector: {{- include "quickwit.metastore.selectorLabels" . | nindent 4 }} --- @@ -156,9 +176,15 @@ spec: targetPort: rest protocol: TCP name: rest + {{- if and (or (eq (.Values.control_plane.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.control_plane.restNodePort }} + nodePort: {{ .Values.control_plane.restNodePort }} + {{- end }} - port: 7281 targetPort: grpc name: grpc + {{- if and (or (eq (.Values.control_plane.serviceType | default .Values.service.type) "NodePort") (eq .Values.service.type "NodePort")) .Values.control_plane.grpcNodePort }} + nodePort: {{ .Values.control_plane.grpcNodePort }} + {{- end }} selector: {{- include "quickwit.control_plane.selectorLabels" . | nindent 4 }}