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()
Kubernetes/client-go now surfaces warnings, by writing directly to stderr by default. This looks a bit ugly:
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/