From e2313d5dc7889538d667598fae9b05b3c94eddf4 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Tue, 13 Apr 2021 11:35:29 +0200 Subject: [PATCH] e2e-upgrade-test: fix verification of CoreDNS --- test/framework/deployment_helpers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/framework/deployment_helpers.go b/test/framework/deployment_helpers.go index 36eee3c833fe..ec09b6e78195 100644 --- a/test/framework/deployment_helpers.go +++ b/test/framework/deployment_helpers.go @@ -241,7 +241,10 @@ func WaitForDNSUpgrade(ctx context.Context, input WaitForDNSUpgradeInput, interv if err := input.Getter.Get(ctx, client.ObjectKey{Name: "coredns", Namespace: metav1.NamespaceSystem}, d); err != nil { return false, err } - if d.Spec.Template.Spec.Containers[0].Image == "k8s.gcr.io/coredns:"+input.DNSVersion { + + // NOTE: coredns image name has changed over time (k8s.gcr.io/coredns, + // k8s.gcr.io/coredns/coredns), so we are checking only if the version actually changed. + if strings.HasSuffix(d.Spec.Template.Spec.Containers[0].Image, fmt.Sprintf(":%s", input.DNSVersion)) { return true, nil } return false, nil