- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for GetContainerResourceAllocation (0.41 sec)
-
pkg/kubelet/status/state/state_checkpoint.go
return err } return nil } // GetContainerResourceAllocation returns current resources allocated to a pod's container func (sc *stateCheckpoint) GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) { sc.mux.RLock() defer sc.mux.RUnlock() return sc.cache.GetContainerResourceAllocation(podUID, containerName) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 13 00:16:44 UTC 2023 - 6.9K bytes - Viewed (0) -
pkg/kubelet/status/fake_status_manager.go
klog.InfoS("RemoveOrphanedStatuses()") return } func (m *fakeManager) GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) { klog.InfoS("GetContainerResourceAllocation()") return m.state.GetContainerResourceAllocation(podUID, containerName) } func (m *fakeManager) GetPodResizeStatus(podUID string) (v1.PodResizeStatus, bool) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 07 05:59:34 UTC 2023 - 2.7K bytes - Viewed (0) -
pkg/kubelet/status/testing/mock_pod_status_provider.go
} // GetContainerResourceAllocation indicates an expected call of GetContainerResourceAllocation. func (mr *MockManagerMockRecorder) GetContainerResourceAllocation(podUID, containerName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetContainerResourceAllocation", reflect.TypeOf((*MockManager)(nil).GetContainerResourceAllocation), podUID, containerName) } // GetPodResizeStatus mocks base method.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 15.4K bytes - Viewed (0) -
pkg/kubelet/status/state/state.go
prCopy[pod][container] = alloc.DeepCopy() } } return prCopy } // Reader interface used to read current pod resource allocation state type Reader interface { GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) GetPodResourceAllocation() PodResourceAllocation GetPodResizeStatus(podUID string) (v1.PodResizeStatus, bool) GetResizeStatus() PodResizeStatus }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Feb 24 18:21:21 UTC 2023 - 2K bytes - Viewed (0) -
pkg/kubelet/status/state/state_mem.go
return &stateMemory{ podAllocation: PodResourceAllocation{}, podResizeStatus: PodResizeStatus{}, } } func (s *stateMemory) GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) { s.RLock() defer s.RUnlock() alloc, ok := s.podAllocation[podUID][containerName] return alloc.DeepCopy(), ok }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Feb 24 18:21:21 UTC 2023 - 4K bytes - Viewed (0) -
pkg/kubelet/status/status_manager.go
// the provided podUIDs. RemoveOrphanedStatuses(podUIDs map[types.UID]bool) // GetContainerResourceAllocation returns checkpointed AllocatedResources value for the container GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) // GetPodResizeStatus returns checkpointed PodStatus.Resize value
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 02 16:27:19 UTC 2024 - 44.3K bytes - Viewed (0) -
pkg/kubelet/kubelet_pods.go
container := kubecontainer.GetContainerSpec(pod, cName) // AllocatedResources values come from checkpoint. It is the source-of-truth. found := false status.AllocatedResources, found = kl.statusManager.GetContainerResourceAllocation(string(pod.UID), cName) if !(container.Resources.Requests == nil && container.Resources.Limits == nil) && !found { // Log error and fallback to AllocatedResources in oldStatus if it exists
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 14 16:09:17 UTC 2024 - 101.2K bytes - Viewed (0) -
pkg/kubelet/kubelet_test.go
if err != nil { t.Fatalf("failed to set pod allocation: %v", err) } } kubelet.HandlePodAdditions([]*v1.Pod{tc.pod}) allocatedResources, found := kubelet.statusManager.GetContainerResourceAllocation(string(tc.pod.UID), tc.pod.Spec.Containers[0].Name) if !found { t.Fatalf("resource allocation should exist: (pod: %#v, container: %s)", tc.pod, tc.pod.Spec.Containers[0].Name) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 14 16:09:17 UTC 2024 - 106.9K bytes - Viewed (0) -
pkg/kubelet/kubelet.go
// (for cpu & memory) from checkpoint store func (kl *Kubelet) updateContainerResourceAllocation(pod *v1.Pod) { for _, c := range pod.Spec.Containers { allocatedResources, found := kl.statusManager.GetContainerResourceAllocation(string(pod.UID), c.Name) if c.Resources.Requests != nil && found { if _, ok := allocatedResources[v1.ResourceCPU]; ok { c.Resources.Requests[v1.ResourceCPU] = allocatedResources[v1.ResourceCPU] }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 14 16:09:17 UTC 2024 - 126.1K bytes - Viewed (0)