Skip to content

Commit

Permalink
Merge pull request #2699 from vincepri/fix-repository
Browse files Browse the repository at this point in the history
🐛 KCP spec.clusterConfiguration.imageRepository should not have "coredns/"
  • Loading branch information
k8s-ci-robot committed Mar 17, 2020
2 parents 52269c5 + 8692ec9 commit cd2c55e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ func TestKubeadmControlPlaneReconciler_updateCoreDNS(t *testing.T) {
DNS: kubeadmv1.DNS{
Type: kubeadmv1.CoreDNS,
ImageMeta: kubeadmv1.ImageMeta{
ImageRepository: "k8s.gcr.io/coredns",
ImageRepository: "k8s.gcr.io",
ImageTag: "1.7.2",
},
},
Expand Down
2 changes: 1 addition & 1 deletion controlplane/kubeadm/internal/workload_cluster_coredns.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (w *Workload) getCoreDNSInfo(ctx context.Context, dns *kubeadmv1.DNS) (*cor
// Handle imageRepository.
toImageRepository := fmt.Sprintf("%s/%s", reference.Domain(parsedImage), reference.Path(parsedImage))
if dns.ImageRepository != "" {
toImageRepository = dns.ImageRepository
toImageRepository = fmt.Sprintf("%s/%s", dns.ImageRepository, reference.Path(parsedImage))
}

// Handle imageTag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func TestGetCoreDNSInfo(t *testing.T) {

dns := &kubeadmv1.DNS{
ImageMeta: kubeadmv1.ImageMeta{
ImageRepository: "myrepo/coredns",
ImageRepository: "myrepo",
ImageTag: "1.7.2-foobar.1",
},
}
Expand Down

0 comments on commit cd2c55e

Please sign in to comment.