mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #129454 from neolit123/automated-cherry-pick-of-#129452-origin-release-1.31-1735822759
Automated cherry pick of #129452 kubeadm: fix a bug where the node.skipPhases in UpgradeNodeConfigurat…
This commit is contained in:
commit
b26ab8bd7f
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package upgrade
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
@ -83,7 +84,22 @@ func newCmdNode(out io.Writer) *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
return nodeRunner.Run(args)
|
||||
data, err := nodeRunner.InitData(args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, ok := data.(*nodeData); !ok {
|
||||
return errors.New("invalid data struct")
|
||||
}
|
||||
if err := nodeRunner.Run(args); err != nil {
|
||||
return err
|
||||
}
|
||||
if nodeOptions.dryRun {
|
||||
fmt.Println("[upgrade/successful] Finished dryrunning successfully!")
|
||||
return nil
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
Args: cobra.NoArgs,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user