From d8b4dd84fc301faff4507f68883ef011ad874529 Mon Sep 17 00:00:00 2001 From: Jacob Tanenbaum Date: Wed, 18 Dec 2024 13:03:28 -0500 Subject: [PATCH] asdf --- .../controller/configmonitor/crd_controller.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/resourcewatch/controller/configmonitor/crd_controller.go b/pkg/resourcewatch/controller/configmonitor/crd_controller.go index ccfeed61c652..5f3872153c1f 100644 --- a/pkg/resourcewatch/controller/configmonitor/crd_controller.go +++ b/pkg/resourcewatch/controller/configmonitor/crd_controller.go @@ -1,9 +1,12 @@ package configmonitor import ( + "fmt" + "k8s.io/client-go/dynamic/dynamicinformer" "k8s.io/klog/v2" + kapi "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/tools/cache" ) @@ -32,6 +35,9 @@ func WireResourceInformersToGitRepo( dynamicInformer.AddEventHandler( cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { + if pod, ok := obj.(*kapi.Pod); ok { + fmt.Printf("KEYWORD: got add for pod %s/%s", pod.Namespace, pod.Name) + } gitStorage.OnAdd(resourceToWatch, obj) }, UpdateFunc: func(oldObj, newObj interface{}) {