Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
yalosev committed Sep 18, 2024
1 parent 8d2d703 commit 77117e5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions pkg/hook/controller/conversion_bindings_controller.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package controller

import (
"fmt"

log "github.com/sirupsen/logrus"
v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"

Expand Down Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion pkg/hook/hook_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions pkg/shell-operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 77117e5

Please sign in to comment.