Skip to content

Commit

Permalink
remove cluster file
Browse files Browse the repository at this point in the history
Signed-off-by: wb-lyk925458 <wb-lyk925458@alibaba-inc.com>
  • Loading branch information
wb-lyk925458 committed Feb 20, 2023
1 parent 999a6ca commit ed021d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
19 changes: 4 additions & 15 deletions cmd/sealer/cmd/cluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
1 change: 0 additions & 1 deletion cmd/sealer/cmd/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,4 @@ type MergeFlags struct {

type UpgradeFlags struct {
Image string
ClusterFile string
}

0 comments on commit ed021d9

Please sign in to comment.