1. Proposed title of this feature request
High cardinality in container_network metrics when using host networking
2. What is the nature and description of the request?
IHAC facing higher Prometheus resource consumption after migration to Openshift 4.16 and OVN-Kubernetes. It is a known behaviour upstream described in the following issue
Problematic dimension handling of network metrics for host network pods/interfaces #2615
As of today it was documented in the following
- Update doc to note a hostnetwork pods' metrics known behavior #3316
- High cardinality in container_network metrics when using host networking
There is old discussions upstream to deal with this behaviour.
To change the current behaviour a per runtime approach is required.
For now, looking at docker runtime networkMode is managed as following
// The network mode of the container
networkMode dockercontainer.NetworkMode
Cri-o runtime integration does not contain anything to manage
https://github.com/google/cadvisor/blob/65fa5b44d3840d465a5c004a0f6722e0fd540137/container/crio/handler.go#L57
// The network mode of the container // TODO
3. Why does the customer need this? (List the business requirements here)
Without this, prometheus is consuming more resources due to high cardinality.
Consumption increases with nodes and pods attached to hostnetwork.
It increase the cost of the overall openshift platform
4. List any affected packages or components.
Kubelet
- relates to
-
OCPSTRAT-2346 Reduce High Cardinality in container_network_* Metrics for Host-Networked Pods After Switching to OVN
-
- New
-