Skip to content

Commit 06427cc

Browse files
committed
Add debug logging at config entry point
- Log HTTPRoutes received by createConfigMapWithHTTPRoutesAndHealth - Show cluster annotations and labels on input
1 parent 83acfe8 commit 06427cc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/homer/config.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,13 @@ func createConfigMapWithHTTPRoutesAndHealth(
387387

388388
cleanupHomerConfig(config)
389389

390+
fmt.Fprintf(os.Stderr, "DEBUG: createConfigMapWithHTTPRoutesAndHealth called with %d HTTPRoutes\n", len(httproutes))
391+
for i, httproute := range httproutes {
392+
if clusterAnnot, ok := httproute.ObjectMeta.Annotations["homer.rajsingh.info/cluster"]; ok {
393+
fmt.Fprintf(os.Stderr, "DEBUG: HTTPRoute[%d] %s has cluster annotation: %s, labels: %v\n", i, httproute.ObjectMeta.Name, clusterAnnot, httproute.ObjectMeta.Labels)
394+
}
395+
}
396+
390397
for _, ingress := range ingresses.Items {
391398
UpdateHomerConfigIngress(config, ingress, domainFilters)
392399
}

0 commit comments

Comments
 (0)