Skip to content

Commit d0a83e0

Browse files
Fix log message (#429)
this technically internally panics when it tries to stringify before logging
1 parent 8411163 commit d0a83e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/controller/service/reconciler_scraper.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ func (s *ServiceReconciler) ScrapeKube(ctx context.Context) {
5353
}
5454

5555
serviceMesh := cache.ServiceMesh(hasEBPFDaemonSet)
56-
logger.Info("detected service mesh", "serviceMesh", serviceMesh)
56+
if serviceMesh == nil {
57+
logger.Info("no service mesh detected")
58+
} else {
59+
logger.Info("detected service mesh", "serviceMesh", serviceMesh)
60+
}
61+
5762
if err := s.consoleClient.RegisterRuntimeServices(runtimeServices, s.GetDeprecatedCustomResources(ctx), nil, serviceMesh); err != nil {
5863
logger.Error(err, "failed to register runtime services, this is an ignorable error but could mean your console needs to be upgraded")
5964
}

0 commit comments

Comments
 (0)