Skip to content

Commit 635ae1a

Browse files
committed
modify run
1 parent a0752c9 commit 635ae1a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: cmd/sealer/cmd/cluster/run.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,6 @@ func runWithClusterfile(clusterFile string, runFlags *types.RunFlags) error {
187187
}
188188

189189
cf.SetCluster(*cluster)
190-
//check cluster
191-
if err = checkCluster(cf); err != nil {
192-
return err
193-
}
194190

195191
imageName := cluster.Spec.Image
196192
imageEngine, err := imageengine.NewImageEngine(options.EngineGlobalConfigurations{})
@@ -225,7 +221,7 @@ func runWithClusterfile(clusterFile string, runFlags *types.RunFlags) error {
225221

226222
func createNewCluster(imageEngine imageengine.Interface, cf clusterfile.Interface, imageSpec *imagev1.ImageSpec, mode string) error {
227223
//check cluster
228-
if err := checkCluster(cf); err != nil {
224+
if err := checkClusterIsExists(cf); err != nil {
229225
return err
230226
}
231227

@@ -427,7 +423,7 @@ func installApplication(appImageName string, envs []string, app *v2.Application,
427423
return nil
428424
}
429425

430-
func checkCluster(cf clusterfile.Interface) error {
426+
func checkClusterIsExists(cf clusterfile.Interface) error {
431427
rawCluster := cf.GetCluster()
432428
file, err := clusterfile.NewClusterFile(nil)
433429
if err == nil {

0 commit comments

Comments
 (0)