- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ExtractResourceValueByContainerName (0.55 sec)
-
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) -
pkg/api/v1/resource/helpers_test.go
pod: getPod("foo", podResources{memoryRequest: "10Mi", memoryLimit: "100Mi"}), expectedValue: "104857600", }, } as := assert.New(t) for idx, tc := range cases { actual, err := ExtractResourceValueByContainerName(tc.fs, tc.pod, tc.cName) if tc.expectedError != nil { as.Equal(tc.expectedError, err, "expected test case [%d] to fail with error %v; got %v", idx, tc.expectedError, err) } else {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jul 07 22:26:13 UTC 2023 - 38.3K bytes - Viewed (0) -
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)