Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobTanenbaum committed Dec 18, 2024
1 parent 12f4564 commit d8b4dd8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/resourcewatch/controller/configmonitor/crd_controller.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down Expand Up @@ -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{}) {
Expand Down

0 comments on commit d8b4dd8

Please sign in to comment.