Skip to content

Commit

Permalink
Reduce log verbosity for the gc service (#1392)
Browse files Browse the repository at this point in the history
If the GC service is not authorixed to list some particular types, it
emits a message "cannot list resource" that may be misleading as it does
not impact the behavior of the GC service. This commit set the log
verbosity to 3 so it is not shown by default, but can be enabled
eventually for troubleshooting
  • Loading branch information
lburgazzoli authored Nov 26, 2024
1 parent d748e02 commit 89bf20a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/services/gc/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (gc *GC) Run(
items, err := dc.Resource(resources[r].GroupVersionResource()).Namespace("").List(ctx, lo)
if err != nil {
if k8serr.IsForbidden(err) {
l.Info(
l.V(3).Info(
"cannot list resource",
"reason", err.Error(),
"gvk", resources[r].GroupVersionKind(),
Expand Down

0 comments on commit 89bf20a

Please sign in to comment.