From 6b66aa2dac0852e2dd08143c50f5b1ce57ff5425 Mon Sep 17 00:00:00 2001 From: Sunjay Bhatia Date: Fri, 3 May 2024 16:31:45 -0400 Subject: [PATCH] don't disable backendtlspolicy, instead update crds Signed-off-by: Sunjay Bhatia --- test/e2e/upgrade/upgrade_test.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/e2e/upgrade/upgrade_test.go b/test/e2e/upgrade/upgrade_test.go index e9c522dcab2..3f779df1ade 100644 --- a/test/e2e/upgrade/upgrade_test.go +++ b/test/e2e/upgrade/upgrade_test.go @@ -144,7 +144,6 @@ var _ = Describe("When upgrading", func() { cmd := exec.Command("../../scripts/install-provisioner-release.sh", contourUpgradeFromVersion) sess, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) require.NoError(f.T(), err) - Eventually(sess, f.RetryTimeout, f.RetryInterval).Should(gexec.Exit(0)) require.True(f.T(), f.CreateGatewayClassAndWaitFor(&gatewayapi_v1.GatewayClass{ @@ -250,6 +249,20 @@ var _ = Describe("When upgrading", func() { poller, err := e2e.StartAppPoller(f.HTTP.HTTPURLBase, appHost, http.StatusOK, GinkgoWriter) require.NoError(f.T(), err) + By("updating gateway-api CRDs to latest") + // Delete existing BackendTLSPolicy CRD. + // TODO: remove this hack once BackendTLSPolicy v1alpha3 or + // above is available in multiple consecutive releases. + cmd := exec.Command("kubectl", "delete", "crd", "backendtlspolicies.gateway.networking.k8s.io") + sess, err := gexec.Start(cmd, GinkgoWriter, GinkgoWriter) + require.NoError(f.T(), err) + Eventually(sess, f.RetryTimeout, f.RetryInterval).Should(gexec.Exit(0)) + + cmd = exec.Command("kubectl", "apply", "-f", "../../../examples/gateway/00-crds.yaml") + sess, err = gexec.Start(cmd, GinkgoWriter, GinkgoWriter) + require.NoError(f.T(), err) + Eventually(sess, f.RetryTimeout, f.RetryInterval).Should(gexec.Exit(0)) + By("deploying updated provisioner") require.NoError(f.T(), f.Provisioner.EnsureResourcesForInclusterProvisioner())