Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ExtractResourceValueByContainerName (0.46 sec)

  1. pkg/api/v1/resource/helpers.go

    	if resource == v1.ResourceCPU {
    		return requestQuantity.MilliValue()
    	}
    
    	return requestQuantity.Value()
    }
    
    // ExtractResourceValueByContainerName extracts the value of a resource
    // by providing container name
    func ExtractResourceValueByContainerName(fs *v1.ResourceFieldSelector, pod *v1.Pod, containerName string) (string, error) {
    	container, err := findContainerInPod(pod, containerName)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 26 13:58:16 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  2. pkg/kubelet/kubelet_pods.go

    	containerName := fs.ContainerName
    	if len(containerName) == 0 {
    		return resource.ExtractContainerResourceValue(fs, container)
    	}
    	return resource.ExtractResourceValueByContainerName(fs, pod, containerName)
    }
    
    // killPod instructs the container runtime to kill the pod. This method requires that
    // the pod status contains the result of the last syncPod, otherwise it may fail to
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
Back to top