change coredns image name to `coredns/coredns` and prefix `v` to tag (#7570)
follow new naming conventions for gcr's coredns image. starting from 1.21 kubeadm assumes it to be `coredns/coredns`: this causes the kubeadm deployment being unable to pull image, beacuse `v` was also added in image tag, until the role `kubernetes-apps` ovverides it with the old name, which is only compatible with <=1.7. Backward comptability with kubeadm <=1.20 is mantained checking kubernetes version and falling back to old names (`coredns:1.xx`) when the version is less than 1.21pull/7583/head
parent
3f4eb9be08
commit
a0ee569091
|
@ -447,9 +447,11 @@ haproxy_image_tag: 2.3
|
||||||
|
|
||||||
# Coredns version should be supported by corefile-migration (or at least work with)
|
# Coredns version should be supported by corefile-migration (or at least work with)
|
||||||
# bundle with kubeadm; if not 'basic' upgrade can sometimes fail
|
# bundle with kubeadm; if not 'basic' upgrade can sometimes fail
|
||||||
coredns_version: "1.7.0"
|
coredns_image_is_namespaced: "{{ (kube_major_version | regex_replace('^v', '') | float) >= 1.21 }}"
|
||||||
coredns_image_repo: "{{ kube_image_repo }}/coredns"
|
|
||||||
coredns_image_tag: "{{ coredns_version }}"
|
coredns_version: "v1.7.0"
|
||||||
|
coredns_image_repo: "{{ kube_image_repo }}{{'/coredns/coredns' if (coredns_image_is_namespaced | bool) else '/coredns' }}"
|
||||||
|
coredns_image_tag: "{{ coredns_version if (coredns_image_is_namespaced | bool) else (coredns_version | regex_replace('^v', '')) }}"
|
||||||
|
|
||||||
nodelocaldns_version: "1.17.1"
|
nodelocaldns_version: "1.17.1"
|
||||||
nodelocaldns_image_repo: "{{ kube_image_repo }}/dns/k8s-dns-node-cache"
|
nodelocaldns_image_repo: "{{ kube_image_repo }}/dns/k8s-dns-node-cache"
|
||||||
|
|
|
@ -21,5 +21,5 @@ etcd:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
dns:
|
dns:
|
||||||
type: CoreDNS
|
type: CoreDNS
|
||||||
imageRepository: {{ coredns_image_repo | regex_replace('/coredns$','') }}
|
imageRepository: {{ coredns_image_repo | regex_replace('/coredns.*$','') }}
|
||||||
imageTag: {{ coredns_image_tag }}
|
imageTag: {{ coredns_image_tag }}
|
||||||
|
|
|
@ -84,7 +84,7 @@ etcd:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
dns:
|
dns:
|
||||||
type: CoreDNS
|
type: CoreDNS
|
||||||
imageRepository: {{ coredns_image_repo | regex_replace('/coredns$','') }}
|
imageRepository: {{ coredns_image_repo | regex_replace('/coredns.*$','') }}
|
||||||
imageTag: {{ coredns_image_tag }}
|
imageTag: {{ coredns_image_tag }}
|
||||||
networking:
|
networking:
|
||||||
dnsDomain: {{ dns_domain }}
|
dnsDomain: {{ dns_domain }}
|
||||||
|
|
Loading…
Reference in New Issue