Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
Dedup API server warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
timebertt committed Feb 18, 2021
1 parent bc95e47 commit 54a4597
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/gardener-resource-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ package main
import (
"os"

"k8s.io/client-go/rest"

"github.com/gardener/gardener-resource-manager/cmd/gardener-resource-manager/app"
"github.com/gardener/gardener-resource-manager/pkg/log"

Expand All @@ -25,6 +27,13 @@ import (
)

func main() {
rest.SetDefaultWarningHandler(
rest.NewWarningWriter(os.Stderr, rest.WarningWriterOptions{
// only print a given warning the first time we receive it
Deduplicate: true,
}),
)

runtimelog.SetLogger(log.ZapLogger(false))
ctx := signals.SetupSignalHandler()

Expand Down

0 comments on commit 54a4597

Please sign in to comment.