coredns to use gcr.io repo

This commit is contained in:
Sandeep Rajan 2018-06-05 11:08:11 -04:00
parent fa20f87f1f
commit fce42e0bf6
3 changed files with 9 additions and 7 deletions

View File

@ -161,7 +161,8 @@ 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 }{
ImageRepository: cfg.ImageRepository,
MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster, MasterTaintKey: kubeadmconstants.LabelNodeRoleMaster,
Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS), Version: GetDNSVersion(k8sVersion, kubeadmconstants.CoreDNS),
}) })

View File

@ -115,7 +115,8 @@ func TestCompileManifests(t *testing.T) {
}, },
{ {
manifest: CoreDNSDeployment, manifest: CoreDNSDeployment,
data: struct{ MasterTaintKey, Version string }{ data: struct{ ImageRepository, MasterTaintKey, Version string }{
ImageRepository: "foo",
MasterTaintKey: "foo", MasterTaintKey: "foo",
Version: "foo", Version: "foo",
}, },

View File

@ -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: