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

Handle client-go warnings #312

Open
anguslees opened this issue Aug 31, 2021 · 0 comments
Open

Handle client-go warnings #312

anguslees opened this issue Aug 31, 2021 · 0 comments

Comments

@anguslees
Copy link
Contributor

Kubernetes/client-go now surfaces warnings, by writing directly to stderr by default. This looks a bit ugly:

INFO  Updating clusterrolebindings system:metrics-server
W0831 14:02:35.085715  269861 warnings.go:70] policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+

Since we have our own logger and output formatting, we should hook into client-go's rest.SetDefaultWarningHandler()

See also https://kubernetes.io/blog/2020/09/03/warnings/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant