package podresize
import "k8s.io/kubernetes/test/e2e/common/node/framework/podresize"
Index ¶
- Constants
- func AggregateContainerResources(spec v1.PodSpec) (v1.ResourceList, v1.ResourceList)
- func ExpectPodResized(ctx context.Context, f *framework.Framework, resizedPod *v1.Pod, expectedContainers []ResizableContainerInfo)
- func MakePodWithResizableContainers(ns, name, timeStamp string, tcInfo []ResizableContainerInfo, podResources *v1.ResourceRequirements) *v1.Pod
- func MakeResizePatch(originalContainers, desiredContainers []ResizableContainerInfo, originPodResources, desiredPodResources *v1.ResourceRequirements) []byte
- func VerifyPodCgroupValues(ctx context.Context, f *framework.Framework, pod *v1.Pod) error
- func VerifyPodContainersCgroupValues(ctx context.Context, f *framework.Framework, pod *v1.Pod, tcInfo []ResizableContainerInfo) error
- func VerifyPodContainersStatusResources(gotCtrStatuses []v1.ContainerStatus, wantCtrs []v1.Container) error
- func VerifyPodLevelStatusResources(gotPod *v1.Pod, wantPodResources *v1.ResourceRequirements) error
- func VerifyPodResizePolicy(gotPod *v1.Pod, wantInfo []ResizableContainerInfo)
- func VerifyPodResources(gotPod *v1.Pod, wantInfo []ResizableContainerInfo, wantPodResources *v1.ResourceRequirements)
- func VerifyPodStatusResources(gotPod *v1.Pod, wantInfo []ResizableContainerInfo) error
- func WaitForPodResizeActuation(ctx context.Context, f *framework.Framework, podClient *e2epod.PodClient, pod *v1.Pod, expectedContainers []ResizableContainerInfo) *v1.Pod
- type ResizableContainerInfo
Constants ¶
const ( MinContainerRuntimeVersion string = "1.6.9" )
Functions ¶
func AggregateContainerResources ¶
func AggregateContainerResources(spec v1.PodSpec) (v1.ResourceList, v1.ResourceList)
func ExpectPodResized ¶
func ExpectPodResized(ctx context.Context, f *framework.Framework, resizedPod *v1.Pod, expectedContainers []ResizableContainerInfo)
func MakePodWithResizableContainers ¶
func MakePodWithResizableContainers(ns, name, timeStamp string, tcInfo []ResizableContainerInfo, podResources *v1.ResourceRequirements) *v1.Pod
func MakeResizePatch ¶
func MakeResizePatch(originalContainers, desiredContainers []ResizableContainerInfo, originPodResources, desiredPodResources *v1.ResourceRequirements) []byte
func VerifyPodCgroupValues ¶
func VerifyPodContainersCgroupValues ¶
func VerifyPodContainersCgroupValues(ctx context.Context, f *framework.Framework, pod *v1.Pod, tcInfo []ResizableContainerInfo) error
func VerifyPodContainersStatusResources ¶
func VerifyPodContainersStatusResources(gotCtrStatuses []v1.ContainerStatus, wantCtrs []v1.Container) error
func VerifyPodLevelStatusResources ¶
func VerifyPodLevelStatusResources(gotPod *v1.Pod, wantPodResources *v1.ResourceRequirements) error
func VerifyPodResizePolicy ¶
func VerifyPodResizePolicy(gotPod *v1.Pod, wantInfo []ResizableContainerInfo)
func VerifyPodResources ¶
func VerifyPodResources(gotPod *v1.Pod, wantInfo []ResizableContainerInfo, wantPodResources *v1.ResourceRequirements)
func VerifyPodStatusResources ¶
func VerifyPodStatusResources(gotPod *v1.Pod, wantInfo []ResizableContainerInfo) error
func WaitForPodResizeActuation ¶
func WaitForPodResizeActuation(ctx context.Context, f *framework.Framework, podClient *e2epod.PodClient, pod *v1.Pod, expectedContainers []ResizableContainerInfo) *v1.Pod
Types ¶
type ResizableContainerInfo ¶
type ResizableContainerInfo struct {
Name string
Resources *cgroups.ContainerResources
CPUPolicy *v1.ResourceResizeRestartPolicy
MemPolicy *v1.ResourceResizeRestartPolicy
RestartCount int32
RestartPolicy v1.ContainerRestartPolicy
InitCtr bool
}
func UpdateExpectedContainerRestarts ¶
func UpdateExpectedContainerRestarts(ctx context.Context, pod *v1.Pod, expectedContainers []ResizableContainerInfo) []ResizableContainerInfo
UpdateExpectedContainerRestarts updates the RestartCounts in expectedContainers by adding them to the existing RestartCounts in the containerStatuses of the provided pod. This reduces the flakiness of the RestartCount assertions by grabbing the current restart count right before the resize operation, and verify the expected increment (0 or 1) rather than the absolute count.
Source Files ¶
resize.go
- Version
- v1.36.0 (latest)
- Published
- Apr 22, 2026
- Platform
- linux/amd64
- Imports
- 19 packages
- Last checked
- 10 seconds ago –
Tools for package owners.