From 5b52ba71a6ac8512b4ea87ec7e89caeaa6205b6a Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Thu, 22 Aug 2024 12:04:47 +0200 Subject: [PATCH 01/13] feat: handle correctly when replicas is set to 0 --- charts/meilisearch/templates/statefulset.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/meilisearch/templates/statefulset.yaml b/charts/meilisearch/templates/statefulset.yaml index 934af82..62bd676 100644 --- a/charts/meilisearch/templates/statefulset.yaml +++ b/charts/meilisearch/templates/statefulset.yaml @@ -5,7 +5,13 @@ metadata: labels: {{- include "meilisearch.labels" . | nindent 4 }} spec: + # Value 0 is bad interpreted it goes to 1 by default + # https://github.com/helm/helm/issues/3164 + {{- if (eq 0 (int .Values.pod.replicas))}} + replicas: 0 + {{- else }} replicas: {{ .Values.replicaCount | default 1 }} + {{- end }} serviceName: {{ template "meilisearch.fullname" . }} selector: matchLabels: From 16b67acd6691da7db971f78555a0164c2b5b842b Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Thu, 22 Aug 2024 12:05:33 +0200 Subject: [PATCH 02/13] chore: upgrade chart version --- charts/meilisearch/Chart.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/meilisearch/Chart.yaml b/charts/meilisearch/Chart.yaml index 72e1a3d..01edf60 100644 --- a/charts/meilisearch/Chart.yaml +++ b/charts/meilisearch/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v1 appVersion: "v1.9.0" description: A Helm chart for the Meilisearch search engine name: meilisearch -version: 0.9.1 +version: 0.9.2 icon: https://raw.githubusercontent.com/meilisearch/integration-guides/main/assets/logos/logo.svg home: https://github.com/meilisearch/meilisearch-kubernetes/tree/main/charts/meilisearch maintainers: - - name: Bruno - email: bruno@meilisearch.com - - name: Clementine - email: clementine@meilisearch.com + - name: Bruno + email: bruno@meilisearch.com + - name: Clementine + email: clementine@meilisearch.com From e08273e2e6a601b514ece9cb4de1cf82c76a9bdc Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Thu, 22 Aug 2024 12:07:59 +0200 Subject: [PATCH 03/13] fix: bad value path --- charts/meilisearch/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/meilisearch/templates/statefulset.yaml b/charts/meilisearch/templates/statefulset.yaml index 62bd676..d21071d 100644 --- a/charts/meilisearch/templates/statefulset.yaml +++ b/charts/meilisearch/templates/statefulset.yaml @@ -7,7 +7,7 @@ metadata: spec: # Value 0 is bad interpreted it goes to 1 by default # https://github.com/helm/helm/issues/3164 - {{- if (eq 0 (int .Values.pod.replicas))}} + {{- if (eq 0 (int .Values.replicaCount))}} replicas: 0 {{- else }} replicas: {{ .Values.replicaCount | default 1 }} From 7036faa74446f01a0b4c8863baeb5f59d866aff5 Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Mon, 9 Sep 2024 10:55:47 +0000 Subject: [PATCH 04/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 416deeb..19072f1 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,7 +60,9 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - replicas: 1 + # Value 0 is bad interpreted it goes to 1 by default + # https://github.com/helm/helm/issues/3164 + replicas: 0 serviceName: meilisearch selector: matchLabels: @@ -75,7 +77,7 @@ spec: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch annotations: - checksum/config: f6a15195f8999e192a9c0b3af067cf48f7d30e057c027646e76d9d68457e1622 + checksum/config: 6508691fa62cd3fc48fa01e5dbfe77244afa8e6451d5ef31bd2b43c3b61643c4 spec: serviceAccountName: meilisearch securityContext: From 34ef98041b5237b602c417b682c4c78b65d91620 Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Mon, 16 Sep 2024 02:39:30 +0000 Subject: [PATCH 05/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 043eab2..19ad645 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -77,7 +77,7 @@ spec: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch annotations: - checksum/config: 57066f343c11bb744192756429e406248806cda981bd4a71c7c02dcafc103072 + checksum/config: 3b17fd234a29aacf2e98ffa09aca207fa5519140923bc64b656070f54412fe1f spec: serviceAccountName: meilisearch securityContext: From 0277fb5bb81d5cfdeeea86e5bab4e8847c90860d Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Mon, 16 Sep 2024 08:29:36 +0200 Subject: [PATCH 06/13] fix: revert replicas value to 1 by default --- manifests/meilisearch.yaml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 19ad645..3dd8709 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,9 +60,7 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - # Value 0 is bad interpreted it goes to 1 by default - # https://github.com/helm/helm/issues/3164 - replicas: 0 + replicas: 1 serviceName: meilisearch selector: matchLabels: @@ -92,8 +90,6 @@ spec: - name: data emptyDir: {} - - containers: - name: meilisearch image: "getmeili/meilisearch:v1.10.0" @@ -102,7 +98,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL readOnlyRootFilesystem: true volumeMounts: - name: tmp @@ -110,8 +106,8 @@ spec: - name: data mountPath: /meili_data envFrom: - - configMapRef: - name: meilisearch-environment + - configMapRef: + name: meilisearch-environment ports: - name: http containerPort: 7700 @@ -135,8 +131,7 @@ spec: port: http periodSeconds: 10 initialDelaySeconds: 0 - resources: - {} + resources: {} --- # Source: meilisearch/templates/tests/test-connection.yaml apiVersion: v1 @@ -152,6 +147,6 @@ spec: containers: - name: wget image: busybox - command: ['wget'] - args: ['meilisearch:7700'] + command: ["wget"] + args: ["meilisearch:7700"] restartPolicy: Never From 4b040748e60ee0e3069136ee6d498154c44fa982 Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Wed, 2 Oct 2024 13:25:59 +0000 Subject: [PATCH 07/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 3dd8709..19ad645 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,7 +60,9 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - replicas: 1 + # Value 0 is bad interpreted it goes to 1 by default + # https://github.com/helm/helm/issues/3164 + replicas: 0 serviceName: meilisearch selector: matchLabels: @@ -90,6 +92,8 @@ spec: - name: data emptyDir: {} + + containers: - name: meilisearch image: "getmeili/meilisearch:v1.10.0" @@ -98,7 +102,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL readOnlyRootFilesystem: true volumeMounts: - name: tmp @@ -106,8 +110,8 @@ spec: - name: data mountPath: /meili_data envFrom: - - configMapRef: - name: meilisearch-environment + - configMapRef: + name: meilisearch-environment ports: - name: http containerPort: 7700 @@ -131,7 +135,8 @@ spec: port: http periodSeconds: 10 initialDelaySeconds: 0 - resources: {} + resources: + {} --- # Source: meilisearch/templates/tests/test-connection.yaml apiVersion: v1 @@ -147,6 +152,6 @@ spec: containers: - name: wget image: busybox - command: ["wget"] - args: ["meilisearch:7700"] + command: ['wget'] + args: ['meilisearch:7700'] restartPolicy: Never From 7eaf8278505f1162860244ed65779de896471ea4 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Wed, 2 Oct 2024 10:32:22 -0300 Subject: [PATCH 08/13] Update meilisearch.yaml --- manifests/meilisearch.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 19ad645..82e55ea 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,9 +60,7 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - # Value 0 is bad interpreted it goes to 1 by default - # https://github.com/helm/helm/issues/3164 - replicas: 0 + replicas: 1 serviceName: meilisearch selector: matchLabels: From e9856ae3e011ebf1d9ba1ed8b9819f2897e7d3a1 Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Wed, 2 Oct 2024 13:32:51 +0000 Subject: [PATCH 09/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 82e55ea..19ad645 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,7 +60,9 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - replicas: 1 + # Value 0 is bad interpreted it goes to 1 by default + # https://github.com/helm/helm/issues/3164 + replicas: 0 serviceName: meilisearch selector: matchLabels: From 909de6b1d87274e6d58ad890a9d5197f911c0f56 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Wed, 2 Oct 2024 10:59:31 -0300 Subject: [PATCH 10/13] Rollback change to keep 1 by default --- manifests/meilisearch.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 19ad645..82e55ea 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,9 +60,7 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - # Value 0 is bad interpreted it goes to 1 by default - # https://github.com/helm/helm/issues/3164 - replicas: 0 + replicas: 1 serviceName: meilisearch selector: matchLabels: From 77552035f7e620584893da7cc3bbdf1d1028c82e Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Wed, 2 Oct 2024 14:00:11 +0000 Subject: [PATCH 11/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 82e55ea..19ad645 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -60,7 +60,9 @@ metadata: app.kubernetes.io/component: search-engine app.kubernetes.io/part-of: meilisearch spec: - replicas: 1 + # Value 0 is bad interpreted it goes to 1 by default + # https://github.com/helm/helm/issues/3164 + replicas: 0 serviceName: meilisearch selector: matchLabels: From 0abab9d5f8330a8d154b885bc9bc8e1f45a730a8 Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Thu, 3 Oct 2024 13:09:18 +0200 Subject: [PATCH 12/13] feat: set default replicas to 1 --- manifests/meilisearch.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 19ad645..5d3ec53 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -62,7 +62,7 @@ metadata: spec: # Value 0 is bad interpreted it goes to 1 by default # https://github.com/helm/helm/issues/3164 - replicas: 0 + replicas: 1 serviceName: meilisearch selector: matchLabels: @@ -92,8 +92,6 @@ spec: - name: data emptyDir: {} - - containers: - name: meilisearch image: "getmeili/meilisearch:v1.10.0" @@ -102,7 +100,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL readOnlyRootFilesystem: true volumeMounts: - name: tmp @@ -110,8 +108,8 @@ spec: - name: data mountPath: /meili_data envFrom: - - configMapRef: - name: meilisearch-environment + - configMapRef: + name: meilisearch-environment ports: - name: http containerPort: 7700 @@ -135,8 +133,7 @@ spec: port: http periodSeconds: 10 initialDelaySeconds: 0 - resources: - {} + resources: {} --- # Source: meilisearch/templates/tests/test-connection.yaml apiVersion: v1 @@ -152,6 +149,6 @@ spec: containers: - name: wget image: busybox - command: ['wget'] - args: ['meilisearch:7700'] + command: ["wget"] + args: ["meilisearch:7700"] restartPolicy: Never From 355ace6015fa367d1ab2f567bf54ecb6e9a2d043 Mon Sep 17 00:00:00 2001 From: brunoocasali Date: Thu, 3 Oct 2024 18:13:50 +0000 Subject: [PATCH 13/13] [CI] Syncing Helm manifest --- manifests/meilisearch.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/manifests/meilisearch.yaml b/manifests/meilisearch.yaml index 5d3ec53..19ad645 100644 --- a/manifests/meilisearch.yaml +++ b/manifests/meilisearch.yaml @@ -62,7 +62,7 @@ metadata: spec: # Value 0 is bad interpreted it goes to 1 by default # https://github.com/helm/helm/issues/3164 - replicas: 1 + replicas: 0 serviceName: meilisearch selector: matchLabels: @@ -92,6 +92,8 @@ spec: - name: data emptyDir: {} + + containers: - name: meilisearch image: "getmeili/meilisearch:v1.10.0" @@ -100,7 +102,7 @@ spec: allowPrivilegeEscalation: false capabilities: drop: - - ALL + - ALL readOnlyRootFilesystem: true volumeMounts: - name: tmp @@ -108,8 +110,8 @@ spec: - name: data mountPath: /meili_data envFrom: - - configMapRef: - name: meilisearch-environment + - configMapRef: + name: meilisearch-environment ports: - name: http containerPort: 7700 @@ -133,7 +135,8 @@ spec: port: http periodSeconds: 10 initialDelaySeconds: 0 - resources: {} + resources: + {} --- # Source: meilisearch/templates/tests/test-connection.yaml apiVersion: v1 @@ -149,6 +152,6 @@ spec: containers: - name: wget image: busybox - command: ["wget"] - args: ["meilisearch:7700"] + command: ['wget'] + args: ['meilisearch:7700'] restartPolicy: Never