• Kubernetes Submit Queue's avatar
    Merge pull request #57527 from mtaufen/kc-metric · 731eaecf
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 64013, 63896, 64139, 57527, 62102). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    add dynamic config metrics
    
    This PR exports config-releated metrics from the Kubelet.
    The Guages for active, assigned, and last-known-good config can be used
    to identify config versions and produce aggregate counts across several
    nodes. The error-reporting Gauge can be used to determine whether a node
    is experiencing a config-related error, and to prodouce an aggregate
    count of nodes in an error state.
    
    https://github.com/kubernetes/features/issues/281
    
    ```release-note
    The Kubelet now exports metrics that report the assigned (node_config_assigned), last-known-good (node_config_last_known_good), and active (node_config_active) config sources, and a metric indicating whether the node is experiencing a config-related error (node_config_error). The config source metrics always report the value 1, and carry the node_config_name, node_config_uid, node_config_resource_version, and node_config_kubelet_key labels, which identify the config version. The error metric reports 1 if there is an error, 0 otherwise.
    ```
    731eaecf
util.go 14.6 KB