From c0ca773982e6e321e924372f78673aef3acb48b7 Mon Sep 17 00:00:00 2001 From: Franco Date: Mon, 13 Nov 2023 13:06:28 -0300 Subject: [PATCH] Add temporal debug log --- internal/controller/policyreport_controller.go | 1 + main.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/internal/controller/policyreport_controller.go b/internal/controller/policyreport_controller.go index b9eb206..bbe9e7d 100644 --- a/internal/controller/policyreport_controller.go +++ b/internal/controller/policyreport_controller.go @@ -81,6 +81,7 @@ func (r *PolicyReportReconciler) Reconcile(ctx context.Context, req ctrl.Request for _, namespace := range r.ExcludeNamespaces { if namespace == policyReport.Namespace { // Namespace is excluded, ignore + log.Log.Info(fmt.Sprintf("Namespace %s is excluded, report will be ignored", namespace)) return reconcile.Result{}, nil } } diff --git a/main.go b/main.go index 9e3c8c9..bb525ef 100644 --- a/main.go +++ b/main.go @@ -18,6 +18,7 @@ package main import ( "flag" + "fmt" "os" "strings" @@ -159,6 +160,7 @@ func main() { setupLog.Error(err, "unable to set up ready check") os.Exit(1) } + setupLog.Info(fmt.Sprintf("Excluded namespaces: %s", excludeNamespaces)) setupLog.Info("starting manager") if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {