kubelet podresource: fix GetAllocatableResources metrics

The GetAllocatableResources increase twice the PodResourcesEndpointRequestsTotalCount
This PR fix this.

Signed-off-by: Moshe Levi <moshele@nvidia.com>
This commit is contained in:
Moshe Levi 2023-01-04 10:55:01 +02:00
parent 88c952d256
commit ce46ba7be8

View File

@ -88,8 +88,6 @@ func (p *v1PodResourcesServer) GetAllocatableResources(ctx context.Context, req
return nil, fmt.Errorf("Pod Resources API GetAllocatableResources disabled")
}
metrics.PodResourcesEndpointRequestsTotalCount.WithLabelValues("v1").Inc()
return &v1.AllocatableResourcesResponse{
Devices: p.devicesProvider.GetAllocatableDevices(),
CpuIds: p.cpusProvider.GetAllocatableCPUs(),