mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 05:46:16 +00:00
Add limits and request processing for storage resources
Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
parent
8811817e7b
commit
090961f8c8
@ -2122,6 +2122,9 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon
|
||||
if ephemeralStorage, found := container.Resources.Limits[v1.ResourceEphemeralStorage]; found {
|
||||
limits[v1.ResourceEphemeralStorage] = ephemeralStorage.DeepCopy()
|
||||
}
|
||||
if storage, found := container.Resources.Limits[v1.ResourceStorage]; found {
|
||||
limits[v1.ResourceStorage] = storage.DeepCopy()
|
||||
}
|
||||
|
||||
convertCustomResources(container.Resources.Limits, limits)
|
||||
}
|
||||
@ -2139,6 +2142,9 @@ func (kl *Kubelet) convertToAPIContainerStatuses(pod *v1.Pod, podStatus *kubecon
|
||||
if ephemeralStorage, found := status.AllocatedResources[v1.ResourceEphemeralStorage]; found {
|
||||
requests[v1.ResourceEphemeralStorage] = ephemeralStorage.DeepCopy()
|
||||
}
|
||||
if storage, found := status.AllocatedResources[v1.ResourceStorage]; found {
|
||||
requests[v1.ResourceStorage] = storage.DeepCopy()
|
||||
}
|
||||
|
||||
convertCustomResources(status.AllocatedResources, requests)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user