Skip to content

Commit

Permalink
e2e-upgrade-test: fix verification of CoreDNS
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Apr 13, 2021
1 parent d1dc87d commit e2313d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/framework/deployment_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e2313d5

Please sign in to comment.