Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/cmd/cluster/config_ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import (
cfgcm "github.com/apecloud/kubeblocks/pkg/configuration/config_manager"
"github.com/apecloud/kubeblocks/pkg/configuration/core"
configctrl "github.com/apecloud/kubeblocks/pkg/controller/configuration"
"github.com/apecloud/kubeblocks/pkg/controllerutil"
intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil"
controllerutil "github.com/apecloud/kubeblocks/pkg/controllerutil"
"github.com/apecloud/kubeblocks/pkg/generics"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericiooptions"
Expand Down Expand Up @@ -63,7 +62,7 @@ type configOpsOptions struct {

var (
createReconfigureExample = templates.Examples(`
# update component params
# update component params
kbcli cluster configure mycluster --components=mysql --config-spec=mysql-3node-tpl --config-file=my.cnf --set=max_connections=1000,general_log=OFF

# if only one component, and one config spec, and one config file, simplify the searching process of configure. e.g:
Expand Down Expand Up @@ -175,7 +174,7 @@ func (o *configOpsOptions) validateConfigParams(rctx *ReconfigureContext, classi
transform := func(params map[string]*parametersv1alpha1.ParametersInFile) []core.ParamPairs {
var result []core.ParamPairs
for file, ps := range params {
configDescs := intctrlutil.GetComponentConfigDescriptions(&rctx.ConfigRender.Spec, file)
configDescs := controllerutil.GetComponentConfigDescriptions(&rctx.ConfigRender.Spec, file)
builder := configctrl.NewValueManager(rctx.ParametersDefs, configDescs)
updatedParams, _ := core.FromStringMap(ps.Parameters, builder.BuildValueTransformer(file))
result = append(result, core.ParamPairs{
Expand Down
11 changes: 10 additions & 1 deletion pkg/cmd/kubeblocks/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,16 @@ func (o *InstallOptions) waitAddonsEnabled() error {
return nil
}

// if addon list is empty, return nil
objs, err := o.Dynamic.Resource(types.AddonGVR()).List(context.TODO(), metav1.ListOptions{
LabelSelector: buildKubeBlocksSelectorLabels(),
})

if err == nil && (objs == nil || len(objs.Items) == 0) {
klog.V(1).Info("No Addons found")
return nil
}

addons := make(map[string]*extensionsv1alpha1.Addon)
fetchAddons := func() error {
objs, err := o.Dynamic.Resource(types.AddonGVR()).List(context.TODO(), metav1.ListOptions{
Expand Down Expand Up @@ -454,7 +464,6 @@ func (o *InstallOptions) waitAddonsEnabled() error {
s := spinner.New(o.Out, spinnerMsg(header))

var (
err error
spinnerDone = func() {
s.SetFinalMsg(msg)
s.Done("")
Expand Down
Loading