Skip to content

Commit 974c6d3

Browse files
committed
chore: rm log init in main and fix operator scope message
1 parent 740875a commit 974c6d3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func main() {
168168
case strings.Contains(watchNamespace, ","):
169169
// multi namespace scoped
170170
controllerOptions.Cache.DefaultNamespaces = getNamespaceConfig(watchNamespace)
171-
setupLog.Info("manager set up with multiple namespaces", "namespaces", watchNamespace)
171+
setupLog.Info("operator running in namespace scoped mode for multiple namespaces", "namespaces", watchNamespace)
172172
case watchNamespace != "":
173173
// namespace scoped
174174
controllerOptions.Cache.DefaultNamespaces = getNamespaceConfig(watchNamespace)
@@ -216,15 +216,13 @@ func main() {
216216
if err = (&controllers.GrafanaDashboardReconciler{
217217
Client: mgr.GetClient(),
218218
Scheme: mgr.GetScheme(),
219-
Log: ctrl.Log.WithName("DashboardReconciler"),
220219
}).SetupWithManager(mgr, ctx); err != nil {
221220
setupLog.Error(err, "unable to create controller", "controller", "GrafanaDashboard")
222221
os.Exit(1)
223222
}
224223
if err = (&controllers.GrafanaDatasourceReconciler{
225224
Client: mgr.GetClient(),
226225
Scheme: mgr.GetScheme(),
227-
Log: ctrl.Log.WithName("DatasourceReconciler"),
228226
}).SetupWithManager(mgr, ctx); err != nil {
229227
setupLog.Error(err, "unable to create controller", "controller", "GrafanaDatasource")
230228
os.Exit(1)

0 commit comments

Comments
 (0)