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

Commit

Permalink
Merge pull request #3558 from dimbleby/suppress-deprecation-warnings
Browse files Browse the repository at this point in the history
Suppress deprecation warnings
  • Loading branch information
Kingdon Barrett authored Nov 1, 2021
2 parents 07948b2 + 8f45be5 commit 5c6a964
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/fluxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,12 @@ func main() {
logger.Log("err", err)
os.Exit(1)
}
dynamicClientset, err := k8sclientdynamic.NewForConfig(restClientConfig)

// The dynamic client gets deprecation warnings, which are not useful:
// see <https://github.com/fluxcd/flux/issues/3554>. Suppress them.
noWarningsRestClientConfig := rest.CopyConfig(restClientConfig)
noWarningsRestClientConfig.WarningHandler = rest.NoWarnings{}
dynamicClientset, err := k8sclientdynamic.NewForConfig(noWarningsRestClientConfig)
if err != nil {
logger.Log("err", err)
os.Exit(1)
Expand Down

0 comments on commit 5c6a964

Please sign in to comment.