mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
added pod capacity to node.Status when cadvisor unavailable. defaults to kubelet's pod list length
This commit is contained in:
parent
6ffe46a9e0
commit
8aa3cb22b5
@ -1839,6 +1839,7 @@ func (kl *Kubelet) setNodeStatus(node *api.Node) error {
|
|||||||
node.Status.Capacity = api.ResourceList{
|
node.Status.Capacity = api.ResourceList{
|
||||||
api.ResourceCPU: *resource.NewMilliQuantity(0, resource.DecimalSI),
|
api.ResourceCPU: *resource.NewMilliQuantity(0, resource.DecimalSI),
|
||||||
api.ResourceMemory: resource.MustParse("0Gi"),
|
api.ResourceMemory: resource.MustParse("0Gi"),
|
||||||
|
api.ResourcePods: *resource.NewQuantity(int64(kl.pods), resource.DecimalSI),
|
||||||
}
|
}
|
||||||
glog.Errorf("Error getting machine info: %v", err)
|
glog.Errorf("Error getting machine info: %v", err)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user