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

Handle client-go warnings #312

@anguslees

Description

@anguslees

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions