Skip to content

Commit

Permalink
Revert "Add prints to check namespace"
Browse files Browse the repository at this point in the history
This reverts commit 644e2bd.
  • Loading branch information
400Ping committed Dec 6, 2024
1 parent 644e2bd commit 0c529a2
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions pkg/cache/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,9 @@ func (ctx *Context) deleteForeignPod(pod *v1.Pod) {
func (ctx *Context) filterConfigMaps(obj interface{}) bool {
switch obj := obj.(type) {
case *v1.ConfigMap:
fmt.Printf("Received ConfigMap: Name=%s, Namespace=%s\n", obj.Name, obj.Namespace)

return (obj.Name == constants.DefaultConfigMapName || obj.Name == constants.ConfigMapName) && obj.Namespace == ctx.namespace
case cache.DeletedFinalStateUnknown:
if cm, ok := obj.Obj.(*v1.ConfigMap); ok {
fmt.Printf("Deleted ConfigMap: Name=%s, Namespace=%s\n", cm.Name, cm.Namespace)
return ctx.filterConfigMaps(cm)
}
return false
return ctx.filterConfigMaps(obj.Obj)
default:
return false
}
Expand Down

0 comments on commit 0c529a2

Please sign in to comment.