🌱 use SDK basecontroller for better logging. (#1269)

* Use basecontroller in sdk-go instead for better logging

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Rename to fakeSyncContext

Signed-off-by: Jian Qiu <jqiu@redhat.com>

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
This commit is contained in:
Jian Qiu
2025-12-01 11:07:02 +08:00
committed by GitHub
parent 26edb9423a
commit 33310619d9
199 changed files with 794 additions and 3268 deletions

View File

@@ -1,10 +1,11 @@
package queue
import (
"github.com/openshift/library-go/pkg/controller/factory"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/cache"
"open-cluster-management.io/sdk-go/pkg/basecontroller/factory"
)
func FileterByLabel(key string) func(obj interface{}) bool {

View File

@@ -4,10 +4,11 @@ import (
"reflect"
"testing"
"github.com/openshift/library-go/pkg/controller/factory"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"open-cluster-management.io/sdk-go/pkg/basecontroller/factory"
)
func TestFileter(t *testing.T) {