Skip to content

Commit

Permalink
Patches ingress-gateway deployment image for e2e
Browse files Browse the repository at this point in the history
Signed-off-by: danehans <[email protected]>
  • Loading branch information
danehans committed Jan 14, 2022
1 parent 566c282 commit 54547af
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,26 @@ func checkUpgrade(t *testing.T) {
cmd.Stderr = os.Stderr
require.NoError(t, cmd.Run(), buf.String())
actual := buf.String()
require.Contains(t, actual, "1.11.3-tetrate-v0 is the latest version in 1.11-tetrate")
require.Contains(t, actual, "1.12.1-tetrate-v1 is the latest version in 1.12-tetrate")

// change image to 1.8.1-tetrate-v0
image := "containers.istio.tetratelabs.com/pilot:1.8.1-tetrate-v0"
// Update the Istiod image
patch := fmt.Sprintf(`{"spec":{"template":{"spec":{"containers":[{"name":"discovery","image":"%s"}]}}}}`,
image)
cmd = exec.Command("kubectl", "patch", "deployment",
"-nistio-system", "istiod", "-p", patch)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
require.NoError(t, cmd.Run())
// Update the ingress gateway image
patch = fmt.Sprintf(`{"spec":{"template":{"spec":{"containers":[{"name":"istio-proxy","image":"%s"}]}}}}`,
image)
cmd = exec.Command("kubectl", "patch", "deployment",
"-nistio-system", "istio-ingressgateway", "-p", patch)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
require.NoError(t, cmd.Run())
require.Eventually(t, func() bool {
cmd := exec.Command("./getmesh", "check-upgrade")
buf := new(bytes.Buffer)
Expand Down

0 comments on commit 54547af

Please sign in to comment.