Skip to content

Commit f0a2269

Browse files
committed
DEBUG
Signed-off-by: Andy Goldstein <[email protected]>
1 parent f978c5d commit f0a2269

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/reconciler/workload/namespace/namespace_reconcile.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,13 @@ func (c *Controller) reconcileResource(ctx context.Context, lclusterName logical
127127
}
128128

129129
old, new := lbls[ClusterLabel], ns.Labels[ClusterLabel]
130+
131+
klog.Infof("ANDY comparing %s %s|%s/%s clusterlabel %q to ns clusterlabel %q",
132+
gvr.String(), lclusterName, unstr.GetNamespace(), unstr.GetName(), old, new)
133+
130134
if old == new {
131135
// Already assigned to the right cluster.
136+
klog.Infof("ANDY no-op %s %s|%s/%s", gvr.String(), lclusterName, unstr.GetNamespace(), unstr.GetName())
132137
return nil
133138
}
134139

@@ -260,6 +265,7 @@ func (c *Controller) reconcileNamespace(ctx context.Context, lclusterName logica
260265
func (c *Controller) enqueueResourcesForNamespace(ns *corev1.Namespace) error {
261266
lastScheduling, previouslyEnqueued := c.namepaceContentsEnqueuedFor(ns)
262267
if previouslyEnqueued && lastScheduling == ns.Labels[ClusterLabel] {
268+
klog.Infof("ANDY enqueueResourcesForNamespace short-circuiting %s|%s", logicalcluster.From(ns), ns.Name)
263269
return nil
264270
}
265271

0 commit comments

Comments
 (0)