From 836b81e48e3580527f889b5cc66b9b9df3d10aeb Mon Sep 17 00:00:00 2001 From: Patrik Cyvoct Date: Mon, 10 Jun 2024 12:29:09 +0200 Subject: [PATCH] Add possibility to specify services type per service Signed-off-by: Patrik Cyvoct --- charts/quickwit/Chart.yaml | 2 +- charts/quickwit/templates/service.yaml | 24 +++++++++++++++++++----- charts/quickwit/values.yaml | 15 +++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/charts/quickwit/Chart.yaml b/charts/quickwit/Chart.yaml index 5942487..a6d0b5b 100644 --- a/charts/quickwit/Chart.yaml +++ b/charts/quickwit/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: quickwit description: Sub-second search & analytics engine on cloud storage. type: application -version: 0.6.0 +version: 0.6.1 appVersion: "v0.8.1" keywords: - quickwit diff --git a/charts/quickwit/templates/service.yaml b/charts/quickwit/templates/service.yaml index bffb46a..b6fb7ec 100644 --- a/charts/quickwit/templates/service.yaml +++ b/charts/quickwit/templates/service.yaml @@ -12,7 +12,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.searcher.serviceType | default .Values.service.type }} {{- if .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} @@ -80,7 +80,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.indexer.serviceType | default .Values.service.type }} {{- if .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} @@ -112,7 +112,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.metastore.serviceType | default .Values.service.type }} {{- if .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} @@ -136,8 +136,15 @@ metadata: name: {{ include "quickwit.fullname" . }}-control-plane labels: {{- include "quickwit.labels" . | nindent 4 }} + annotations: + {{- with .Values.service.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.control_plane.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.control_plane.serviceType | default .Values.service.type }} {{- if .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} @@ -162,8 +169,15 @@ metadata: name: {{ include "quickwit.fullname" . }}-janitor labels: {{- include "quickwit.labels" . | nindent 4 }} + annotations: + {{- with .Values.service.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.janitor.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: - type: {{ .Values.service.type }} + type: {{ .Values.janitor.serviceType | default .Values.service.type }} {{- if .Values.service.ipFamilyPolicy }} ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }} {{- end }} diff --git a/charts/quickwit/values.yaml b/charts/quickwit/values.yaml index c16cf99..471e974 100644 --- a/charts/quickwit/values.yaml +++ b/charts/quickwit/values.yaml @@ -105,6 +105,8 @@ searcher: serviceAnnotations: {} + # serviceType: ClusterIP + nodeSelector: {} tolerations: [] @@ -162,6 +164,8 @@ indexer: serviceAnnotations: {} + # serviceType: ClusterIP + nodeSelector: {} tolerations: [] @@ -220,6 +224,8 @@ metastore: serviceAnnotations: {} + # serviceType: ClusterIP + nodeSelector: {} tolerations: [] @@ -265,6 +271,10 @@ control_plane: podAnnotations: {} + serviceAnnotations: {} + + # serviceType: ClusterIP + nodeSelector: {} tolerations: [] @@ -313,6 +323,10 @@ janitor: podAnnotations: {} + serviceAnnotations: {} + + # serviceType: ClusterIP + nodeSelector: {} tolerations: [] @@ -457,6 +471,7 @@ prometheusRule: # severity: warning service: + # Service type configuration default for all Quickwit services type: ClusterIP # -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)