kubeadm: Fix CoreDNS image generation bug

With #64976 GetGenericArchImage was used for generating the CoreDNS image path.

This generated incorrect image in the form `prefix/coredns-goarch:tag` instead
of just `prefix/coredns:tag`.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This commit is contained in:
Rostislav M. Georgiev 2018-07-03 15:54:25 +03:00
parent 09784ccf83
commit 5cafed260c

View File

@ -77,7 +77,7 @@ func GetAllImages(cfg *kubeadmapi.MasterConfiguration) []string {
dnsImage := GetGenericArchImage(cfg.ImageRepository, "k8s-dns-kube-dns", constants.KubeDNSVersion)
if features.Enabled(cfg.FeatureGates, features.CoreDNS) {
dnsImage = GetGenericArchImage(cfg.ImageRepository, "coredns", constants.CoreDNSVersion)
dnsImage = fmt.Sprintf("%s/%s:%s", cfg.ImageRepository, constants.CoreDNS, constants.CoreDNSVersion)
}
imgs = append(imgs, dnsImage)
return imgs