@@ -29,6 +29,7 @@ import (
2929 "github.com/Masterminds/semver/v3"
3030 kbappsv1 "github.com/apecloud/kubeblocks/apis/apps/v1"
3131 "github.com/apecloud/kubeblocks/pkg/constant"
32+ "github.com/fatih/color"
3233 "github.com/spf13/cobra"
3334 helmaction "helm.sh/helm/v3/pkg/action"
3435 "helm.sh/helm/v3/pkg/chart/loader"
@@ -48,7 +49,6 @@ import (
4849 extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
4950
5051 "github.com/apecloud/kbcli/pkg/cluster"
51- clusterCmd "github.com/apecloud/kbcli/pkg/cmd/cluster"
5252 "github.com/apecloud/kbcli/pkg/printer"
5353 "github.com/apecloud/kbcli/pkg/types"
5454 "github.com/apecloud/kbcli/pkg/util"
@@ -149,9 +149,10 @@ func newInstallCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra
149149 util .CheckErr (o .Run (f , streams ))
150150 // avoid unnecessary messages for upgrade
151151 fmt .Fprintf (o .Out , "addon %s installed successfully\n " , o .name )
152- if err := clusterCmd .RegisterClusterChart (f , streams , "" , o .name , o .clusterChartVersion , o .clusterChartRepo ); err != nil {
153- util .CheckErr (err )
154- }
152+ fmt .Fprintf (o .Out , "You can run the following command to register a cluster:\n " )
153+ fmt .Fprint (o .Out , color .GreenString (fmt .Sprintf (" kbcli cluster register %s --engine %s --repo %s --version <cluster-chart-version>\n " , o .name , o .name , o .clusterChartRepo )))
154+ fmt .Fprintf (o .Out , "To find available cluster chart versions, run:\n " )
155+ fmt .Fprint (o .Out , color .GreenString (fmt .Sprintf (" helm search repo kubeblocks-addons/%s-cluster --versions\n " , o .name )))
155156 },
156157 }
157158 cmd .Flags ().BoolVar (& o .force , "force" , false , "force install the addon and ignore the version check" )
0 commit comments