diff --git a/.vib/zookeeper/ginkgo/zookeeper_test.go b/.vib/zookeeper/ginkgo/zookeeper_test.go index 427811b99f..3e0369868f 100644 --- a/.vib/zookeeper/ginkgo/zookeeper_test.go +++ b/.vib/zookeeper/ginkgo/zookeeper_test.go @@ -10,6 +10,7 @@ import ( . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" ) @@ -34,6 +35,7 @@ var _ = Describe("Zookeeper", Ordered, func() { It("should have access to the created key", func() { getAvailableReplicas := func(ss *appsv1.StatefulSet) int32 { return ss.Status.AvailableReplicas } + getRestartedAtAnnotation := func(pod *v1.Pod) string { return pod.Annotations["kubectl.kubernetes.io/restartedAt"] } getSucceededJobs := func(j *batchv1.Job) int32 { return j.Status.Succeeded } getOpts := metav1.GetOptions{} @@ -72,17 +74,15 @@ var _ = Describe("Zookeeper", Ordered, func() { return c.BatchV1().Jobs(namespace).Get(ctx, createKeyJobName, getOpts) }, timeout, PollingInterval).Should(WithTransform(getSucceededJobs, Equal(int32(1)))) - By("scaling down to 0 replicas") - ss, err = utils.StsScale(ctx, c, ss, 0) + By("rollout restart the statefulset") + _, err = utils.StsRolloutRestart(ctx, c, ss) Expect(err).NotTo(HaveOccurred()) - Eventually(func() (*appsv1.StatefulSet, error) { - return c.AppsV1().StatefulSets(namespace).Get(ctx, stsName, getOpts) - }, timeout, PollingInterval).Should(WithTransform(getAvailableReplicas, BeZero())) - - By("scaling up to the original replicas") - ss, err = utils.StsScale(ctx, c, ss, origReplicas) - Expect(err).NotTo(HaveOccurred()) + for i := int(origReplicas) - 1; i >= 0; i-- { + Eventually(func() (*v1.Pod, error) { + return c.CoreV1().Pods(namespace).Get(ctx, fmt.Sprintf("%s-%d", stsName, i), getOpts) + }, timeout, PollingInterval).Should(WithTransform(getRestartedAtAnnotation, Not(BeEmpty()))) + } Eventually(func() (*appsv1.StatefulSet, error) { return c.AppsV1().StatefulSets(namespace).Get(ctx, stsName, getOpts) diff --git a/bitnami/zookeeper/CHANGELOG.md b/bitnami/zookeeper/CHANGELOG.md index c32e6766f2..e6649a99cb 100644 --- a/bitnami/zookeeper/CHANGELOG.md +++ b/bitnami/zookeeper/CHANGELOG.md @@ -1,8 +1,12 @@ # Changelog -## 13.4.12 (2024-09-07) +## 13.4.13 (2024-09-17) -* [bitnami/zookeeper] fix: add apiVersion and kind to volumeClaimTemplates ([#29289](https://github.com/bitnami/charts/pull/29289)) +* [bitnami/zookeeper] test: :white_check_mark: Improve reliability of ginkgo tests ([#29475](https://github.com/bitnami/charts/pull/29475)) + +## 13.4.12 (2024-09-09) + +* [bitnami/zookeeper] fix: add apiVersion and kind to volumeClaimTemplates (#29289) ([f393472](https://github.com/bitnami/charts/commit/f393472ab8514b93c8e0f0de9f6b022d43d16142)), closes [#29289](https://github.com/bitnami/charts/issues/29289) ## 13.4.11 (2024-08-30) diff --git a/bitnami/zookeeper/Chart.yaml b/bitnami/zookeeper/Chart.yaml index 27586e4a9d..10fb5ae5db 100644 --- a/bitnami/zookeeper/Chart.yaml +++ b/bitnami/zookeeper/Chart.yaml @@ -28,4 +28,4 @@ maintainers: name: zookeeper sources: - https://github.com/bitnami/charts/tree/main/bitnami/zookeeper -version: 13.4.12 +version: 13.4.13