From 04e6635ededc43d69428535a7c1074cfdc204e04 Mon Sep 17 00:00:00 2001 From: Teodor-Adrian Mihaescu Date: Tue, 14 Jan 2025 11:31:26 +0100 Subject: [PATCH] Revert "chore: Revert removed Telemetry override e2e test (#1703)" This reverts commit 52bc5fd81aff23be21b29a5cc95081c76e3bf737. --- test/e2e/overrides_test.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/test/e2e/overrides_test.go b/test/e2e/overrides_test.go index febbc1e6a..e6719c294 100644 --- a/test/e2e/overrides_test.go +++ b/test/e2e/overrides_test.go @@ -9,7 +9,6 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" @@ -72,23 +71,6 @@ var _ = Describe(suite.ID(), Label(suite.LabelTelemetry), Ordered, func() { }, periodic.ConsistentlyTimeout, periodic.DefaultInterval).Should(Succeed()) } - assertTelemetryReconciliationDisabled := func(ctx context.Context, k8sClient client.Client, webhookName string) { - key := types.NamespacedName{ - Name: webhookName, - } - var validatingWebhookConfiguration admissionregistrationv1.ValidatingWebhookConfiguration - Expect(k8sClient.Get(ctx, key, &validatingWebhookConfiguration)).To(Succeed()) - - validatingWebhookConfiguration.Webhooks[0].ClientConfig.CABundle = []byte{} - Expect(k8sClient.Update(ctx, &validatingWebhookConfiguration)).To(Succeed()) - - // The deleted CA bundle should not be restored, since the reconciliation is disabled by the overrides configmap - Consistently(func(g Gomega) { - g.Expect(k8sClient.Get(ctx, key, &validatingWebhookConfiguration)).To(Succeed()) - g.Expect(validatingWebhookConfiguration.Webhooks[0].ClientConfig.CABundle).To(BeEmpty()) - }, periodic.ConsistentlyTimeout, periodic.DefaultInterval).Should(Succeed()) - } - BeforeAll(func() { now = time.Now().UTC() k8sObjects := makeResources() @@ -189,9 +171,5 @@ var _ = Describe(suite.ID(), Label(suite.LabelTelemetry), Ordered, func() { It("Should disable the reconciliation of the tracepipeline", func() { assertPipelineReconciliationDisabled(ctx, k8sClient, kitkyma.TraceGatewayConfigMap, appNameLabelKey) }) - - It("Should disable the reconciliation of the telemetry CR", func() { - assertTelemetryReconciliationDisabled(ctx, k8sClient, kitkyma.ValidatingWebhookName) - }) }) })