From ae5fb05b1d0524f831c92261e199026cc4069450 Mon Sep 17 00:00:00 2001 From: Bastian Hofmann Date: Thu, 7 Sep 2023 17:12:24 +0200 Subject: [PATCH] Update to Qdrant 1.5.0 (#73) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update to Qdrant 1.5.0 This also changes the probes to use the new healthz readyz and livez endpoints Resolves https://github.com/qdrant/qdrant-helm/issues/72 Resolves https://github.com/qdrant/qdrant-helm/issues/71 * Update charts/qdrant/templates/statefulset.yaml Co-authored-by: Tim Visée * Update qdrant_probes_test.go --------- Co-authored-by: Tim Visée --- CHANGELOG.md | 5 +++ charts/qdrant/CHANGELOG.md | 6 ++-- charts/qdrant/Chart.yaml | 12 +++---- charts/qdrant/templates/statefulset.yaml | 6 ++-- test/qdrant_probes_test.go | 44 ++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 test/qdrant_probes_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 806097e..886922f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [qdrant-0.5.0](https://github.com/qdrant/qdrant-helm/tree/qdrant-0.5.0) (2023-09-07) + +- Update to Qdrant 1.5.0 [\#72](https://github.com/qdrant/qdrant-helm/issues/72) +- Use new Qdrant readiness and liveness endpoints [\#71](https://github.com/qdrant/qdrant-helm/issues/71) + ## [qdrant-0.4.1](https://github.com/qdrant/qdrant-helm/tree/qdrant-0.4.1) (2023-09-04) - Add PriorityClass support to StatefulSet Pod template [\#68](https://github.com/qdrant/qdrant-helm/pull/68) diff --git a/charts/qdrant/CHANGELOG.md b/charts/qdrant/CHANGELOG.md index f5d0cd6..dd58822 100644 --- a/charts/qdrant/CHANGELOG.md +++ b/charts/qdrant/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [qdrant-0.4.1](https://github.com/qdrant/qdrant-helm/tree/qdrant-0.4.1) (2023-09-04) +## [qdrant-0.5.0](https://github.com/qdrant/qdrant-helm/tree/qdrant-0.5.0) (2023-09-07) -- Add PriorityClass support to StatefulSet Pod template [\#68](https://github.com/qdrant/qdrant-helm/pull/68) -- Don't use alpine image for file permission updates [\#69](https://github.com/qdrant/qdrant-helm/pull/69) +- Update to Qdrant 1.5.0 [\#72](https://github.com/qdrant/qdrant-helm/issues/72) +- Use new Qdrant readiness and liveness endpoints [\#71](https://github.com/qdrant/qdrant-helm/issues/71) diff --git a/charts/qdrant/Chart.yaml b/charts/qdrant/Chart.yaml index b083a0f..1d5998e 100644 --- a/charts/qdrant/Chart.yaml +++ b/charts/qdrant/Chart.yaml @@ -13,18 +13,18 @@ maintainers: url: https://github.com/qdrant icon: https://qdrant.github.io/qdrant-helm/logo_with_text.svg type: application -version: 0.4.1 -appVersion: v1.4.1 +version: 0.5.0 +appVersion: v1.5.0 annotations: artifacthub.io/category: database artifacthub.io/changes: | - kind: added - description: Add PriorityClass support to StatefulSet Pod template + description: Update to Qdrant 1.5.0 links: - name: Github Issue - url: https://github.com/qdrant/qdrant-helm/pull/68 + url: https://github.com/qdrant/qdrant-helm/issues/72 - kind: added - description: Don't use alpine image for file permission updates + description: Use new Qdrant readiness and liveness endpoints links: - name: Github Issue - url: https://github.com/qdrant/qdrant-helm/pull/69 + url: https://github.com/qdrant/qdrant-helm/issues/71 diff --git a/charts/qdrant/templates/statefulset.yaml b/charts/qdrant/templates/statefulset.yaml index 1cf695d..7790c45 100644 --- a/charts/qdrant/templates/statefulset.yaml +++ b/charts/qdrant/templates/statefulset.yaml @@ -96,7 +96,7 @@ spec: {{- end }} {{- if eq .name "http"}} httpGet: - path: / + path: /livez port: {{ .targetPort }} {{- end }} initialDelaySeconds: {{ $values.livenessProbe.initialDelaySeconds }} @@ -113,7 +113,7 @@ spec: {{- end }} {{- if eq .name "http"}} httpGet: - path: / + path: /readyz port: {{ .targetPort }} {{- end }} initialDelaySeconds: {{ $values.readinessProbe.initialDelaySeconds }} @@ -130,7 +130,7 @@ spec: {{- end }} {{- if eq .name "http"}} httpGet: - path: / + path: /readyz port: {{ .targetPort }} {{- end }} initialDelaySeconds: {{ $values.startupProbe.initialDelaySeconds }} diff --git a/test/qdrant_probes_test.go b/test/qdrant_probes_test.go new file mode 100644 index 0000000..c3962ec --- /dev/null +++ b/test/qdrant_probes_test.go @@ -0,0 +1,44 @@ +package test + +import ( + "github.com/samber/lo" + corev1 "k8s.io/api/core/v1" + "path/filepath" + "strings" + "testing" + + "github.com/gruntwork-io/terratest/modules/helm" + "github.com/gruntwork-io/terratest/modules/k8s" + "github.com/gruntwork-io/terratest/modules/logger" + "github.com/gruntwork-io/terratest/modules/random" + "github.com/stretchr/testify/require" + appsv1 "k8s.io/api/apps/v1" +) + +func TestDefaultProbesOnStatefulset(t *testing.T) { + t.Parallel() + + helmChartPath, err := filepath.Abs("../charts/qdrant") + releaseName := "qdrant" + require.NoError(t, err) + + namespaceName := "qdrant-" + strings.ToLower(random.UniqueId()) + logger.Log(t, "Namespace: %s\n", namespaceName) + + options := &helm.Options{ + KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName), + } + + output := helm.RenderTemplate(t, options, helmChartPath, releaseName, []string{"templates/statefulset.yaml"}) + + var statefulSet appsv1.StatefulSet + helm.UnmarshalK8SYaml(t, output, &statefulSet) + + container, _ := lo.Find(statefulSet.Spec.Template.Spec.Containers, func(container corev1.Container) bool { + return container.Name == "qdrant" + }) + + require.Equal(t, "/readyz", container.StartupProbe.HTTPGet.Path) + require.Equal(t, "/readyz", container.ReadinessProbe.HTTPGet.Path) + require.Equal(t, "/livez", container.LivenessProbe.HTTPGet.Path) +}