kubernetesk8s.io/kubernetes/test/e2e/common/node/framework/podresize Index | Files

package podresize

import "k8s.io/kubernetes/test/e2e/common/node/framework/podresize"

Index

Constants

const (
	MinContainerRuntimeVersion string = "1.6.9"
)

Functions

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) *v1.Pod

func MakeResizePatch

func MakeResizePatch(originalContainers, desiredContainers []ResizableContainerInfo) []byte

func VerifyPodContainersCgroupValues

func VerifyPodContainersCgroupValues(ctx context.Context, f *framework.Framework, pod *v1.Pod, tcInfo []ResizableContainerInfo) error

func VerifyPodResizePolicy

func VerifyPodResizePolicy(gotPod *v1.Pod, wantInfo []ResizableContainerInfo)

func VerifyPodResources

func VerifyPodResources(gotPod *v1.Pod, wantInfo []ResizableContainerInfo)

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.34.0-beta.0
Published
Jul 16, 2025
Platform
windows/amd64
Imports
18 packages
Last checked
19 minutes ago

Tools for package owners.