Skip to content

Commit

Permalink
don't disable backendtlspolicy, instead update crds
Browse files Browse the repository at this point in the history
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
  • Loading branch information
sunjayBhatia committed May 6, 2024
1 parent a4cdc21 commit 24a3040
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/e2e/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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())

Expand Down

0 comments on commit 24a3040

Please sign in to comment.