diff --git a/controllers/extensions/addon_controller.go b/controllers/extensions/addon_controller.go
index 033b111557fe..f197756a1de8 100644
--- a/controllers/extensions/addon_controller.go
+++ b/controllers/extensions/addon_controller.go
@@ -21,7 +21,6 @@ package extensions
import (
"context"
- "fmt"
"runtime"
batchv1 "k8s.io/api/batch/v1"
@@ -157,23 +156,17 @@ func (r *AddonReconciler) deleteExternalResources(reqCtx intctrlutil.RequestCtx,
}
job := &batchv1.Job{}
if err := r.Get(reqCtx.Ctx, key, job); err != nil {
- fmt.Println("not found: ", jobName)
return client.IgnoreNotFound(err)
}
if !job.DeletionTimestamp.IsZero() {
- fmt.Println("DeletionTimestamp.IsZero: ", jobName)
- fmt.Println(job.DeletionTimestamp)
return nil
}
if err := r.Delete(reqCtx.Ctx, job); err != nil {
- fmt.Println("can not found when delete: ", jobName)
return client.IgnoreNotFound(err)
}
- fmt.Println("succee delete: ", jobName)
return nil
}
for _, j := range []string{getInstallJobName(addon), getUninstallJobName(addon)} {
- fmt.Println("job name: ", j)
if err := deleteJobIfExist(j); err != nil {
return nil, err
}
diff --git a/controllers/extensions/reconciler_auto_install_check.go b/controllers/extensions/reconciler_auto_install_check.go
index 93196341d14c..f386b60abe00 100644
--- a/controllers/extensions/reconciler_auto_install_check.go
+++ b/controllers/extensions/reconciler_auto_install_check.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
ctrl "sigs.k8s.io/controller-runtime"
extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
@@ -51,14 +49,12 @@ func (r *autoInstallCheckReconciler) PreCondition(tree *kubebuilderx.ObjectTree)
func (r *autoInstallCheckReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("autoInstallCheckReconciler", "phase", addon.Status.Phase)
- fmt.Println("autoInstallCheckReconciler, phase: ", addon.Status.Phase)
if addon.Spec.Installable == nil || !addon.Spec.Installable.AutoInstall {
return kubebuilderx.Continue, nil
}
// proceed if has specified addon.spec.installSpec
if addon.Spec.InstallSpec != nil {
r.reqCtx.Log.V(1).Info("has specified addon.spec.installSpec")
- // fmt.Println("has specified addon.spec.installSpec")
return kubebuilderx.Continue, nil
}
enabledAddonWithDefaultValues(r.reqCtx.Ctx, &r.stageCtx, addon, AddonAutoInstall, "Addon enabled auto-install")
diff --git a/controllers/extensions/reconciler_enabled_with_default_values.go b/controllers/extensions/reconciler_enabled_with_default_values.go
index b5a600088028..824ae5cab8fe 100644
--- a/controllers/extensions/reconciler_enabled_with_default_values.go
+++ b/controllers/extensions/reconciler_enabled_with_default_values.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
ctrl "sigs.k8s.io/controller-runtime"
extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
@@ -51,10 +49,8 @@ func (r *enabledWithDefaultValuesReconciler) PreCondition(tree *kubebuilderx.Obj
func (r *enabledWithDefaultValuesReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("enabledWithDefaultValuesReconciler", "phase", addon.Status.Phase)
- fmt.Println("enabledWithDefaultValuesReconciler, phase: ", addon.Status.Phase)
if addon.Spec.InstallSpec.HasSetValues() || addon.Spec.InstallSpec.IsDisabled() {
r.reqCtx.Log.V(1).Info("has specified addon.spec.installSpec")
- // fmt.Println("enabledWithDefaultValuesReconciler, has specified addon.spec.installSpec")
return kubebuilderx.Continue, nil
}
if v, ok := addon.Annotations[AddonDefaultIsEmpty]; ok && v == trueVal {
diff --git a/controllers/extensions/reconciler_fetchN_deletion_check.go b/controllers/extensions/reconciler_fetchN_deletion_check.go
index 58427c2fb039..cf3ac8e5b73e 100644
--- a/controllers/extensions/reconciler_fetchN_deletion_check.go
+++ b/controllers/extensions/reconciler_fetchN_deletion_check.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
corev1 "k8s.io/api/core/v1"
ctrl "sigs.k8s.io/controller-runtime"
@@ -54,7 +52,6 @@ func (r *fetchNDeletionCheckReconciler) PreCondition(tree *kubebuilderx.ObjectTr
func (r *fetchNDeletionCheckReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("get addon", "generation", addon.Generation, "observedGeneration", addon.Status.ObservedGeneration)
- fmt.Println("fetchNDeletionCheckReconciler, phase: ", addon.Status.Phase)
r.reqCtx.UpdateCtxValue(operandValueKey, addon)
// CheckIfAddonUsedByCluster, if err, skip the deletion stage
@@ -78,7 +75,6 @@ func (r *fetchNDeletionCheckReconciler) Reconcile(tree *kubebuilderx.ObjectTree)
return kubebuilderx.Continue, err
}
r.reqCtx.Log.V(1).Info("start normal reconcile")
- // fmt.Println("fetchNDeletionCheckReconciler, start normal reconcile")
return kubebuilderx.Continue, nil
}
diff --git a/controllers/extensions/reconciler_gen_id_proceed.go b/controllers/extensions/reconciler_gen_id_proceed.go
index 56ee455987df..418747c4a3f7 100644
--- a/controllers/extensions/reconciler_gen_id_proceed.go
+++ b/controllers/extensions/reconciler_gen_id_proceed.go
@@ -55,7 +55,6 @@ func (r *genIDProceedReconciler) PreCondition(tree *kubebuilderx.ObjectTree) *ku
func (r *genIDProceedReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("genIDProceedCheckReconciler", "phase", addon.Status.Phase)
- fmt.Println("genIDProceedCheckReconciler, phase: ", addon.Status.Phase)
helmInstallJob, err1 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "install", tree)
helmUninstallJob, err2 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "uninstall", tree)
@@ -91,11 +90,8 @@ func (r *genIDProceedReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubeb
}
}
- fmt.Println("Failed: ", addon.Status.Phase)
-
if addon.Generation == addon.Status.ObservedGeneration {
r.setReconciled()
- fmt.Println("aaaaaa")
return kubebuilderx.RetryAfter(time.Second), nil
}
} else if (err1 == nil && helmInstallJob.Status.Succeeded > 0) || (err2 == nil && helmUninstallJob.Status.Succeeded > 0) {
@@ -106,15 +102,8 @@ func (r *genIDProceedReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubeb
err := r.reconciler.PatchPhase(addon, r.stageCtx, "Disabled", AddonDisabled)
return kubebuilderx.Continue, err
}
- if helmInstallJob.Status.Succeeded > 0 {
- fmt.Println("helmInstallJob.Status.Succeeded")
- }
- if helmUninstallJob.Status.Succeeded > 0 {
- fmt.Println("helmUninstallJob.Status.Succeeded")
- }
if (!helmInstallJob.DeletionTimestamp.IsZero() && helmInstallJob.Status.Succeeded > 0) ||
(!helmUninstallJob.DeletionTimestamp.IsZero() && helmUninstallJob.Status.Succeeded > 0) {
- fmt.Println("!Job.DeletionTimestamp.IsZero(), DeletionTimestamp: ", helmInstallJob.DeletionTimestamp)
return kubebuilderx.Continue, nil
}
@@ -125,7 +114,6 @@ func (r *genIDProceedReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubeb
return kubebuilderx.Continue, err
}
r.setReconciled()
- fmt.Println("setReconciled")
return kubebuilderx.Continue, nil
}
}
diff --git a/controllers/extensions/reconciler_installable_check.go b/controllers/extensions/reconciler_installable_check.go
index a5e55795ec50..465479059214 100644
--- a/controllers/extensions/reconciler_installable_check.go
+++ b/controllers/extensions/reconciler_installable_check.go
@@ -66,7 +66,6 @@ func (r *installableCheckReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (k
}
r.reqCtx.Log.V(1).Info("installableCheckReconciler", "phase", addon.Status.Phase)
- fmt.Println("installableCheckReconciler, phase: ", addon.Status.Phase)
// check the annotations constraint about Kubeblocks Version
check, err := checkAnnotationsConstraint(r.reqCtx.Ctx, r.reconciler, addon)
if err != nil {
diff --git a/controllers/extensions/reconciler_metadata_check.go b/controllers/extensions/reconciler_metadata_check.go
index 51c4d47aba68..63eec04e0d2b 100644
--- a/controllers/extensions/reconciler_metadata_check.go
+++ b/controllers/extensions/reconciler_metadata_check.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
ctrl "sigs.k8s.io/controller-runtime"
extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
@@ -51,7 +49,6 @@ func (r *metadataCheckReconciler) PreCondition(tree *kubebuilderx.ObjectTree) *k
func (r *metadataCheckReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("metadataCheckReconciler", "phase", addon.Status.Phase)
- fmt.Println("metadataCheckReconciler, phase: ", addon.Status.Phase)
setAddonProviderAndVersion(addon)
if err := r.reconciler.Client.Update(r.reqCtx.Ctx, addon); err != nil {
r.setRequeueWithErr(err, "")
diff --git a/controllers/extensions/reconciler_progressing.go b/controllers/extensions/reconciler_progressing.go
index 480ffad14bb7..18b0e157d96a 100644
--- a/controllers/extensions/reconciler_progressing.go
+++ b/controllers/extensions/reconciler_progressing.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
apierrors "k8s.io/apimachinery/pkg/api/errors"
extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
@@ -57,7 +55,6 @@ func (r *progressingReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebu
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("progressingReconciler", "phase", addon.Status.Phase)
- fmt.Println("progressingReconciler, phase: ", addon.Status.Phase)
helmInstallJob, err1 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "install", tree)
helmUninstallJob, err2 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "uninstall", tree)
diff --git a/controllers/extensions/reconciler_terminal_state.go b/controllers/extensions/reconciler_terminal_state.go
index 42e293ad9545..8f04034a76c7 100644
--- a/controllers/extensions/reconciler_terminal_state.go
+++ b/controllers/extensions/reconciler_terminal_state.go
@@ -20,8 +20,6 @@ along with this program. If not, see .
package extensions
import (
- "fmt"
-
extensionsv1alpha1 "github.com/apecloud/kubeblocks/apis/extensions/v1alpha1"
"github.com/apecloud/kubeblocks/pkg/controller/kubebuilderx"
"github.com/apecloud/kubeblocks/pkg/controller/model"
@@ -51,7 +49,6 @@ func (r *terminalStateReconciler) PreCondition(tree *kubebuilderx.ObjectTree) *k
func (r *terminalStateReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilderx.Result, error) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("terminalStateReconciler", "phase", addon.Status.Phase)
- fmt.Println("terminalStateReconciler, phase: ", addon.Status.Phase)
helmInstallJob, err1 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "install", tree)
helmUninstallJob, err2 := r.reconciler.GetInstallJob(r.reqCtx.Ctx, "uninstall", tree)
diff --git a/controllers/extensions/utils.go b/controllers/extensions/utils.go
index b4e7d432cde5..2f33c8ee3552 100644
--- a/controllers/extensions/utils.go
+++ b/controllers/extensions/utils.go
@@ -253,7 +253,6 @@ func (r *AddonReconciler) PatchPhase(addon *extensionsv1alpha1.Addon, stageCtx s
func (r *helmTypeInstallReconciler) Reconcile(tree *kubebuilderx.ObjectTree) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("helmTypeInstallStage", "phase", addon.Status.Phase)
- fmt.Println("helmTypeInstallReconciler, phase: ", addon.Status.Phase)
mgrNS := viper.GetString(constant.CfgKeyCtrlrMgrNS)
key := client.ObjectKey{
@@ -423,7 +422,6 @@ func (r *helmTypeInstallReconciler) Reconcile(tree *kubebuilderx.ObjectTree) {
func (r *helmTypeUninstallReconciler) Reconcile(tree *kubebuilderx.ObjectTree) {
addon := tree.GetRoot().(*extensionsv1alpha1.Addon)
r.reqCtx.Log.V(1).Info("helmTypeUninstallReconciler", "phase", addon.Status.Phase)
- fmt.Println("helmTypeUninstallReconciler, phase: ", addon.Status.Phase)
key := client.ObjectKey{
Namespace: viper.GetString(constant.CfgKeyCtrlrMgrNS),
Name: getUninstallJobName(addon),
@@ -433,7 +431,6 @@ func (r *helmTypeUninstallReconciler) Reconcile(tree *kubebuilderx.ObjectTree) {
r.setRequeueWithErr(err, "")
return
} else if err == nil {
- fmt.Println("get helmTypeUninstallJob!!!!!!!!!!!!!!!")
if helmUninstallJob.Status.Succeeded > 0 {
r.reqCtx.Log.V(1).Info("helm uninstall job succeed", "job", key)
// TODO: