Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for GetContainerResourceAllocation (0.43 sec)

  1. 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)
  2. 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)
  3. 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)
Back to top