mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
add test case
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
This commit is contained in:
parent
d9a5a04fa3
commit
00552765f2
@ -21,6 +21,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
@ -156,7 +157,11 @@ func printAvailableUpgrades(upgrades []upgrade.Upgrade, w io.Writer, isExternalE
|
|||||||
|
|
||||||
UnstableVersionFlag := ""
|
UnstableVersionFlag := ""
|
||||||
if len(newK8sVersion.PreRelease()) != 0 {
|
if len(newK8sVersion.PreRelease()) != 0 {
|
||||||
UnstableVersionFlag = "--allow-experimental-upgrades"
|
if strings.HasPrefix(newK8sVersion.PreRelease(), "rc") {
|
||||||
|
UnstableVersionFlag = " --allow-release-candidate-upgrades"
|
||||||
|
} else {
|
||||||
|
UnstableVersionFlag = " --allow-experimental-upgrades"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if isExternalEtcd && upgrade.CanUpgradeEtcd() {
|
if isExternalEtcd && upgrade.CanUpgradeEtcd() {
|
||||||
@ -238,7 +243,7 @@ func printAvailableUpgrades(upgrades []upgrade.Upgrade, w io.Writer, isExternalE
|
|||||||
fmt.Fprintln(w, "")
|
fmt.Fprintln(w, "")
|
||||||
fmt.Fprintln(w, "You can now apply the upgrade by executing the following command:")
|
fmt.Fprintln(w, "You can now apply the upgrade by executing the following command:")
|
||||||
fmt.Fprintln(w, "")
|
fmt.Fprintln(w, "")
|
||||||
fmt.Fprintf(w, "\tkubeadm upgrade apply %s %s\n", upgrade.After.KubeVersion, UnstableVersionFlag)
|
fmt.Fprintf(w, "\tkubeadm upgrade apply %s%s\n", upgrade.After.KubeVersion, UnstableVersionFlag)
|
||||||
fmt.Fprintln(w, "")
|
fmt.Fprintln(w, "")
|
||||||
|
|
||||||
if upgrade.Before.KubeadmVersion != upgrade.After.KubeadmVersion {
|
if upgrade.Before.KubeadmVersion != upgrade.After.KubeadmVersion {
|
||||||
|
@ -302,7 +302,7 @@ Etcd 3.0.17 3.1.12
|
|||||||
|
|
||||||
You can now apply the upgrade by executing the following command:
|
You can now apply the upgrade by executing the following command:
|
||||||
|
|
||||||
kubeadm upgrade apply v1.9.0-beta.1
|
kubeadm upgrade apply v1.9.0-beta.1 --allow-experimental-upgrades
|
||||||
|
|
||||||
Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.0-beta.1.
|
Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.0-beta.1.
|
||||||
|
|
||||||
@ -350,7 +350,7 @@ Etcd 3.0.17 3.1.12
|
|||||||
|
|
||||||
You can now apply the upgrade by executing the following command:
|
You can now apply the upgrade by executing the following command:
|
||||||
|
|
||||||
kubeadm upgrade apply v1.9.0-rc.1
|
kubeadm upgrade apply v1.9.0-rc.1 --allow-release-candidate-upgrades
|
||||||
|
|
||||||
Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.0-rc.1.
|
Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.0-rc.1.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user