mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
commit
5c5d26786e
@ -464,14 +464,20 @@ function update-coredns-config() {
|
|||||||
cleanup() {
|
cleanup() {
|
||||||
rm -rf "${download_dir}"
|
rm -rf "${download_dir}"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup RETURN
|
||||||
|
|
||||||
# Get the new installed CoreDNS version
|
# Get the new installed CoreDNS version
|
||||||
echo "Waiting for CoreDNS to update"
|
echo "== Waiting for CoreDNS to update =="
|
||||||
until [[ $("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}') -ne ${COREDNS_DEPLOY_RESOURCE_VERSION} ]]; do
|
local -r endtime=$(date -ud "3 minute" +%s)
|
||||||
|
until [[ $("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}') -ne ${COREDNS_DEPLOY_RESOURCE_VERSION} ]] || [[ $(date -u +%s) -gt $endtime ]]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "Fetching the latest installed CoreDNS version"
|
|
||||||
|
if [[ $("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}') -ne ${COREDNS_DEPLOY_RESOURCE_VERSION} ]]; then
|
||||||
|
echo "== CoreDNS ResourceVersion changed =="
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "== Fetching the latest installed CoreDNS version =="
|
||||||
NEW_COREDNS_VERSION=$("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.spec.template.spec.containers[:1].image}' | cut -d ":" -f 2)
|
NEW_COREDNS_VERSION=$("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.spec.template.spec.containers[:1].image}' | cut -d ":" -f 2)
|
||||||
|
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
|
Loading…
Reference in New Issue
Block a user