fix upgrade logic bug

Signed-off-by: 24sama <jacksama@foxmail.com>
This commit is contained in:
24sama 2022-03-07 16:01:00 +08:00
parent 8e3bdfd8ad
commit 9dddb92a12
2 changed files with 14 additions and 4 deletions

View File

@ -190,6 +190,11 @@ func (c *CheckResultModule) Init() {
type CleanClusterConfigurationModule struct {
common.KubeModule
Skip bool
}
func (c *CleanClusterConfigurationModule) IsSkip() bool {
return c.Skip
}
func (c *CleanClusterConfigurationModule) Init() {
@ -210,6 +215,11 @@ func (c *CleanClusterConfigurationModule) Init() {
type ConvertModule struct {
common.KubeModule
Skip bool
}
func (c *ConvertModule) IsSkip() bool {
return c.Skip
}
func (c *ConvertModule) Init() {

View File

@ -45,10 +45,10 @@ func NewUpgradeClusterPipeline(runtime *common.KubeRuntime) error {
&kubernetes.SetUpgradePlanModule{Step: kubernetes.ToV121},
&kubernetes.ProgressiveUpgradeModule{Step: kubernetes.ToV121},
&loadbalancer.HaproxyModule{Skip: !runtime.Cluster.ControlPlaneEndpoint.IsInternalLBEnabled()},
&kubesphere.CleanClusterConfigurationModule{},
&kubesphere.ConvertModule{},
&kubesphere.DeployModule{},
&kubesphere.CheckResultModule{},
&kubesphere.CleanClusterConfigurationModule{Skip: !runtime.Cluster.KubeSphere.Enabled},
&kubesphere.ConvertModule{Skip: !runtime.Cluster.KubeSphere.Enabled},
&kubesphere.DeployModule{Skip: !runtime.Cluster.KubeSphere.Enabled},
&kubesphere.CheckResultModule{Skip: !runtime.Cluster.KubeSphere.Enabled},
&kubernetes.SetUpgradePlanModule{Step: kubernetes.ToV122},
&kubernetes.ProgressiveUpgradeModule{Step: kubernetes.ToV122},
&filesystem.ChownModule{},