From 77117e588e788fdd629ea997be75dd7171d2edce Mon Sep 17 00:00:00 2001 From: Yuriy Losev Date: Wed, 18 Sep 2024 17:48:12 +0400 Subject: [PATCH] ++ --- pkg/hook/controller/conversion_bindings_controller.go | 5 ----- pkg/hook/hook_manager.go | 1 - pkg/shell-operator/operator.go | 2 -- 3 files changed, 8 deletions(-) diff --git a/pkg/hook/controller/conversion_bindings_controller.go b/pkg/hook/controller/conversion_bindings_controller.go index 8dbb7982..052c0e74 100644 --- a/pkg/hook/controller/conversion_bindings_controller.go +++ b/pkg/hook/controller/conversion_bindings_controller.go @@ -1,8 +1,6 @@ package controller import ( - "fmt" - log "github.com/sirupsen/logrus" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -82,14 +80,11 @@ func (c *ConversionBindingsController) DisableConversionBindings() { } func (c *ConversionBindingsController) CanHandleEvent(crdName string, request *v1.ConversionRequest, rule conversion.Rule) bool { - fmt.Println("LINKS", c.Links) _, has := c.Links[crdName] - fmt.Println("HAS1 ", has) if !has { return false } _, has = c.Links[crdName][rule] - fmt.Println("HAS2 ", has) return has } diff --git a/pkg/hook/hook_manager.go b/pkg/hook/hook_manager.go index 58941cfa..63789892 100644 --- a/pkg/hook/hook_manager.go +++ b/pkg/hook/hook_manager.go @@ -349,7 +349,6 @@ func (hm *Manager) HandleConversionEvent(crdName string, request *v1.ConversionR for _, hookName := range vHooks { h := hm.GetHook(hookName) if h.HookController.CanHandleConversionEvent(crdName, request, rule) { - fmt.Println("FOUND") h.HookController.HandleConversionEvent(crdName, request, rule, func(info controller.BindingExecutionInfo) { if createTaskFn != nil { createTaskFn(h, info) diff --git a/pkg/shell-operator/operator.go b/pkg/shell-operator/operator.go index efc0a397..ddf6fee7 100644 --- a/pkg/shell-operator/operator.go +++ b/pkg/shell-operator/operator.go @@ -335,8 +335,6 @@ func (op *ShellOperator) conversionEventHandler(crdName string, request *v1.Conv convTask = newTask }) - fmt.Println("TASK", convTask) - if convTask == nil { return nil, fmt.Errorf("no hook found for '%s' event for crd/%s", string(KubernetesConversion), crdName) }