You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cluster/gce/upgrade.sh
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -464,14 +464,20 @@ function update-coredns-config() {
464
464
cleanup() {
465
465
rm -rf "${download_dir}"
466
466
}
467
-
trap cleanup EXIT
467
+
trap cleanup RETURN
468
468
469
469
# Get the new installed CoreDNS version
470
-
echo"Waiting for CoreDNS to update"
471
-
until [[ $("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}')-ne${COREDNS_DEPLOY_RESOURCE_VERSION} ]];do
470
+
echo"== Waiting for CoreDNS to update =="
471
+
local -r endtime=$(date -ud "3 minute" +%s)
472
+
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
472
473
sleep 1
473
474
done
474
-
echo"Fetching the latest installed CoreDNS version"
475
+
476
+
if [[ $("${KUBE_ROOT}"/cluster/kubectl.sh -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}')-ne${COREDNS_DEPLOY_RESOURCE_VERSION} ]];then
477
+
echo"== CoreDNS ResourceVersion changed =="
478
+
fi
479
+
480
+
echo"== Fetching the latest installed CoreDNS version =="
0 commit comments