mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Merge pull request #64775 from rajansandeep/imgcoredns
Automatic merge from submit-queue (batch tested with PRs 63322, 64718, 64708, 64775, 64777). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. CoreDNS to use gcr.io repo **What this PR does / why we need it**: Switch CoreDNS to use the gcr.io in kubeadm **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note CoreDNS deployment configuration now uses k8s.gcr.io imageRepository ```
This commit is contained in:
commit
c8cecdea2f
@ -161,9 +161,10 @@ func createKubeDNSAddon(deploymentBytes, serviceBytes []byte, client clientset.I
|
|||||||
func coreDNSAddon(cfg *kubeadmapi.MasterConfiguration, client clientset.Interface, k8sVersion *version.Version) error {
|
func coreDNSAddon(cfg *kubeadmapi.MasterConfiguration, client clientset.Interface, k8sVersion *version.Version) error {
|
||||||
// Get the YAML manifest conditionally based on the k8s version
|
// Get the YAML manifest conditionally based on the k8s version
|
||||||
dnsDeploymentBytes := GetCoreDNSManifest(k8sVersion)
|
dnsDeploymentBytes := GetCoreDNSManifest(k8sVersion)
|
||||||
coreDNSDeploymentBytes, err := kubeadmutil.ParseTemplate(dnsDeploymentBytes, struct{ MasterTaintKey, Version string }{
|
coreDNSDeploymentBytes, err := kubeadmutil.ParseTemplate(dnsDeploymentBytes, struct{ ImageRepository, MasterTaintKey, Version string }{
|
||||||
MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster,
|
ImageRepository: cfg.ImageRepository,
|
||||||
Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS),
|
MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster,
|
||||||
|
Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error when parsing CoreDNS deployment template: %v", err)
|
return fmt.Errorf("error when parsing CoreDNS deployment template: %v", err)
|
||||||
|
@ -115,9 +115,10 @@ func TestCompileManifests(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
manifest: CoreDNSDeployment,
|
manifest: CoreDNSDeployment,
|
||||||
data: struct{ MasterTaintKey, Version string }{
|
data: struct{ ImageRepository, MasterTaintKey, Version string }{
|
||||||
MasterTaintKey: "foo",
|
ImageRepository: "foo",
|
||||||
Version: "foo",
|
MasterTaintKey: "foo",
|
||||||
|
Version: "foo",
|
||||||
},
|
},
|
||||||
expected: true,
|
expected: true,
|
||||||
},
|
},
|
||||||
|
@ -247,7 +247,7 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
containers:
|
containers:
|
||||||
- name: coredns
|
- name: coredns
|
||||||
image: coredns/coredns:{{ .Version }}
|
image: {{ .ImageRepository }}/coredns:{{ .Version }}
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
Loading…
Reference in New Issue
Block a user