diff --git a/cmd/sealer/cmd/cluster/upgrade.go b/cmd/sealer/cmd/cluster/upgrade.go index d4c62eb7592..b63df023b49 100644 --- a/cmd/sealer/cmd/cluster/upgrade.go +++ b/cmd/sealer/cmd/cluster/upgrade.go @@ -46,17 +46,12 @@ func NewUpgradeCmd() *cobra.Command { Example: exampleForUpgradeCmd, RunE: func(cmd *cobra.Command, args []string) error { var ( - err error - clusterFile = upgradeFlags.ClusterFile - imageName = upgradeFlags.Image + err error + imageName = upgradeFlags.Image ) - if imageName == "" && clusterFile == "" { - return fmt.Errorf("you must input image name Or use Clusterfile") - } - - if clusterFile != "" { - return upgradeWithClusterfile(clusterFile, upgradeFlags) + if imageName == "" { + return fmt.Errorf("you must input image name") } imageEngine, err := imageengine.NewImageEngine(imagecommon.EngineGlobalConfigurations{}) @@ -88,7 +83,6 @@ func NewUpgradeCmd() *cobra.Command { upgradeFlags = &types.UpgradeFlags{} upgradeCmd.Flags().StringVarP(&upgradeFlags.Image, "image", "i", "", "set image name") - upgradeCmd.Flags().StringVarP(&upgradeFlags.ClusterFile, "Clusterfile", "f", "", "Clusterfile path to run a Kubernetes cluster") return upgradeCmd } @@ -178,8 +172,3 @@ func upgradeCluster(imageEngine imageengine.Interface) error { return nil } - -func upgradeWithClusterfile(clusterFile string, upgradeFlags *types.UpgradeFlags) error { - //TODO:upgrade with cluster file - return nil -} diff --git a/cmd/sealer/cmd/types/types.go b/cmd/sealer/cmd/types/types.go index d3c3c2c2188..3a1182e4dc8 100644 --- a/cmd/sealer/cmd/types/types.go +++ b/cmd/sealer/cmd/types/types.go @@ -90,5 +90,4 @@ type MergeFlags struct { type UpgradeFlags struct { Image string - ClusterFile string }