mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-03-17 16:12:49 -04:00
coredns to use gcr.io repo
This commit is contained in:
parent
fa20f87f1f
commit
fce42e0bf6
3 changed files with 9 additions and 7 deletions
|
|
@ -161,9 +161,10 @@ func createKubeDNSAddon(deploymentBytes, serviceBytes []byte, client clientset.I
|
|||
func coreDNSAddon(cfg *kubeadmapi.MasterConfiguration, client clientset.Interface, k8sVersion *version.Version) error {
|
||||
// Get the YAML manifest conditionally based on the k8s version
|
||||
dnsDeploymentBytes := GetCoreDNSManifest(k8sVersion)
|
||||
coreDNSDeploymentBytes, err := kubeadmutil.ParseTemplate(dnsDeploymentBytes, struct{ MasterTaintKey, Version string }{
|
||||
MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster,
|
||||
Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS),
|
||||
coreDNSDeploymentBytes, err := kubeadmutil.ParseTemplate(dnsDeploymentBytes, struct{ ImageRepository, MasterTaintKey, Version string }{
|
||||
ImageRepository: cfg.ImageRepository,
|
||||
MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster,
|
||||
Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS),
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("error when parsing CoreDNS deployment template: %v", err)
|
||||
|
|
|
|||
|
|
@ -115,9 +115,10 @@ func TestCompileManifests(t *testing.T) {
|
|||
},
|
||||
{
|
||||
manifest: CoreDNSDeployment,
|
||||
data: struct{ MasterTaintKey, Version string }{
|
||||
MasterTaintKey: "foo",
|
||||
Version: "foo",
|
||||
data: struct{ ImageRepository, MasterTaintKey, Version string }{
|
||||
ImageRepository: "foo",
|
||||
MasterTaintKey: "foo",
|
||||
Version: "foo",
|
||||
},
|
||||
expected: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ spec:
|
|||
effect: NoSchedule
|
||||
containers:
|
||||
- name: coredns
|
||||
image: coredns/coredns:{{ .Version }}
|
||||
image: {{ .ImageRepository }}/coredns:{{ .Version }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
|
|
|
|||
Loading…
Reference in a new issue