From 993e39e47206c6ed036c001d772cbd63f39762e8 Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 3 Apr 2024 15:16:15 +0000 Subject: [PATCH 1/3] Fix duplicate labels --- charts/quickwit/templates/_helpers.tpl | 13 ++++++++++--- .../templates/control-plane-deployment.yaml | 2 +- charts/quickwit/templates/indexer-statefulset.yaml | 2 +- charts/quickwit/templates/janitor-deployment.yaml | 2 +- charts/quickwit/templates/metastore-deployment.yaml | 2 +- charts/quickwit/templates/searcher-statefulset.yaml | 2 +- 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/charts/quickwit/templates/_helpers.tpl b/charts/quickwit/templates/_helpers.tpl index f2e0a36..8a17566 100644 --- a/charts/quickwit/templates/_helpers.tpl +++ b/charts/quickwit/templates/_helpers.tpl @@ -30,6 +30,15 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} +{{/* +Custom labels +*/}} +{{- define "quickwit.customLabels" -}} +{{- if .Values.additionalLabels }} +{{ toYaml .Values.additionalLabels }} +{{- end }} +{{- end }} + {{/* Common labels */}} @@ -40,9 +49,7 @@ helm.sh/chart: {{ include "quickwit.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- if .Values.additionalLabels }} -{{ toYaml .Values.additionalLabels }} -{{- end }} +{{ include "quickwit.customLabels" . }} {{- end }} {{/* diff --git a/charts/quickwit/templates/control-plane-deployment.yaml b/charts/quickwit/templates/control-plane-deployment.yaml index 499032a..7fa147b 100644 --- a/charts/quickwit/templates/control-plane-deployment.yaml +++ b/charts/quickwit/templates/control-plane-deployment.yaml @@ -19,7 +19,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.labels" . | nindent 8 }} + {{- include "quickwit.customLabels" . | nindent 8 }} {{- include "quickwit.control_plane.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/indexer-statefulset.yaml b/charts/quickwit/templates/indexer-statefulset.yaml index 39c0534..455c5d5 100644 --- a/charts/quickwit/templates/indexer-statefulset.yaml +++ b/charts/quickwit/templates/indexer-statefulset.yaml @@ -23,7 +23,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.labels" . | nindent 8 }} + {{- include "quickwit.customLabels" . | nindent 8 }} {{- include "quickwit.indexer.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/janitor-deployment.yaml b/charts/quickwit/templates/janitor-deployment.yaml index 4dc7ed9..c45dc50 100644 --- a/charts/quickwit/templates/janitor-deployment.yaml +++ b/charts/quickwit/templates/janitor-deployment.yaml @@ -20,7 +20,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.labels" . | nindent 8 }} + {{- include "quickwit.customLabels" . | nindent 8 }} {{- include "quickwit.janitor.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/metastore-deployment.yaml b/charts/quickwit/templates/metastore-deployment.yaml index ec3b494..4b07054 100644 --- a/charts/quickwit/templates/metastore-deployment.yaml +++ b/charts/quickwit/templates/metastore-deployment.yaml @@ -18,7 +18,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.labels" . | nindent 8 }} + {{- include "quickwit.customLabels" . | nindent 8 }} {{- include "quickwit.metastore.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/searcher-statefulset.yaml b/charts/quickwit/templates/searcher-statefulset.yaml index cbd8b46..136a504 100644 --- a/charts/quickwit/templates/searcher-statefulset.yaml +++ b/charts/quickwit/templates/searcher-statefulset.yaml @@ -23,7 +23,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.labels" . | nindent 8 }} + {{- include "quickwit.customLabels" . | nindent 8 }} {{- include "quickwit.searcher.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} From e8fd3861ba6e24604fd98b690b5a3b061ad7900f Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 3 Apr 2024 16:06:20 +0000 Subject: [PATCH 2/3] Increase version --- charts/quickwit/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/quickwit/Chart.yaml b/charts/quickwit/Chart.yaml index 81ac9d9..65469dd 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.5.11 +version: 0.5.12 appVersion: "v0.8.1" keywords: - quickwit From d5d67b62509ff1f4faf89397096fc8594dcb01cb Mon Sep 17 00:00:00 2001 From: Remi Dettai Date: Wed, 3 Apr 2024 16:08:41 +0000 Subject: [PATCH 3/3] Rename customLabels to additionalLabels --- charts/quickwit/templates/_helpers.tpl | 4 ++-- charts/quickwit/templates/control-plane-deployment.yaml | 2 +- charts/quickwit/templates/indexer-statefulset.yaml | 2 +- charts/quickwit/templates/janitor-deployment.yaml | 2 +- charts/quickwit/templates/metastore-deployment.yaml | 2 +- charts/quickwit/templates/searcher-statefulset.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/quickwit/templates/_helpers.tpl b/charts/quickwit/templates/_helpers.tpl index 8a17566..73c37d6 100644 --- a/charts/quickwit/templates/_helpers.tpl +++ b/charts/quickwit/templates/_helpers.tpl @@ -33,7 +33,7 @@ Create chart name and version as used by the chart label. {{/* Custom labels */}} -{{- define "quickwit.customLabels" -}} +{{- define "quickwit.additionalLabels" -}} {{- if .Values.additionalLabels }} {{ toYaml .Values.additionalLabels }} {{- end }} @@ -49,7 +49,7 @@ helm.sh/chart: {{ include "quickwit.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -{{ include "quickwit.customLabels" . }} +{{ include "quickwit.additionalLabels" . }} {{- end }} {{/* diff --git a/charts/quickwit/templates/control-plane-deployment.yaml b/charts/quickwit/templates/control-plane-deployment.yaml index 7fa147b..bbf964d 100644 --- a/charts/quickwit/templates/control-plane-deployment.yaml +++ b/charts/quickwit/templates/control-plane-deployment.yaml @@ -19,7 +19,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.customLabels" . | nindent 8 }} + {{- include "quickwit.additionalLabels" . | nindent 8 }} {{- include "quickwit.control_plane.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/indexer-statefulset.yaml b/charts/quickwit/templates/indexer-statefulset.yaml index 455c5d5..399e467 100644 --- a/charts/quickwit/templates/indexer-statefulset.yaml +++ b/charts/quickwit/templates/indexer-statefulset.yaml @@ -23,7 +23,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.customLabels" . | nindent 8 }} + {{- include "quickwit.additionalLabels" . | nindent 8 }} {{- include "quickwit.indexer.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/janitor-deployment.yaml b/charts/quickwit/templates/janitor-deployment.yaml index c45dc50..b5d87b7 100644 --- a/charts/quickwit/templates/janitor-deployment.yaml +++ b/charts/quickwit/templates/janitor-deployment.yaml @@ -20,7 +20,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.customLabels" . | nindent 8 }} + {{- include "quickwit.additionalLabels" . | nindent 8 }} {{- include "quickwit.janitor.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/metastore-deployment.yaml b/charts/quickwit/templates/metastore-deployment.yaml index 4b07054..a17afa5 100644 --- a/charts/quickwit/templates/metastore-deployment.yaml +++ b/charts/quickwit/templates/metastore-deployment.yaml @@ -18,7 +18,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.customLabels" . | nindent 8 }} + {{- include "quickwit.additionalLabels" . | nindent 8 }} {{- include "quickwit.metastore.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} diff --git a/charts/quickwit/templates/searcher-statefulset.yaml b/charts/quickwit/templates/searcher-statefulset.yaml index 136a504..aa8fd68 100644 --- a/charts/quickwit/templates/searcher-statefulset.yaml +++ b/charts/quickwit/templates/searcher-statefulset.yaml @@ -23,7 +23,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "quickwit.customLabels" . | nindent 8 }} + {{- include "quickwit.additionalLabels" . | nindent 8 }} {{- include "quickwit.searcher.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }}