Skip to content

Commit

Permalink
Merge pull request kubernetes#102905 from pacoxu/automated-cherry-pic…
Browse files Browse the repository at this point in the history
…k-of-#100353-upstream-release-1.21

cherry-pick kubernetes#100353: strip prefix 'v' in coredns version if exists
  • Loading branch information
k8s-ci-robot committed Jul 28, 2021
2 parents fc0ffa5 + f7e8a1e commit 1688b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cluster/gce/upgrade.sh
Expand Up @@ -480,7 +480,7 @@ function update-coredns-config() {
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}' | sed -r 's/.+:v?(.+)/\1/')

case "$(uname -m)" in
x86_64*)
Expand Down Expand Up @@ -552,7 +552,7 @@ function update-coredns-config() {
}

echo "Fetching the previously installed CoreDNS version"
CURRENT_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)
CURRENT_COREDNS_VERSION=$("${KUBE_ROOT}/cluster/kubectl.sh" -n kube-system get deployment coredns -o=jsonpath='{$.spec.template.spec.containers[:1].image}' | sed -r 's/.+:v?(.+)/\1/')
COREDNS_DEPLOY_RESOURCE_VERSION=$("${KUBE_ROOT}/cluster/kubectl.sh" -n kube-system get deployment coredns -o=jsonpath='{$.metadata.resourceVersion}')

master_upgrade=true
Expand Down

0 comments on commit 1688b70

Please sign in to comment.