Documentation
¶
Index ¶
- Constants
- Variables
- func GetContainerStartedTime(p *v1.Pod, containerName string) (time.Time, error)
- func GetTransitionTimeForReadyCondition(p *v1.Pod) (time.Time, error)
- func ImagePullTest(ctx context.Context, f *framework.Framework, image string, ...) *v1.Pod
- func RunLivenessTest(ctx context.Context, f *framework.Framework, pod *v1.Pod, ...)
- func RunSidecarLivenessTest(ctx context.Context, f *framework.Framework, pod *v1.Pod, ...)
- func VerifyPodLevelStatus(gotPod *v1.Pod) error
- type ConformanceContainer
- func (cc *ConformanceContainer) Create(ctx context.Context) *v1.Pod
- func (cc *ConformanceContainer) Delete(ctx context.Context) error
- func (cc *ConformanceContainer) GetPhase(ctx context.Context) (v1.PodPhase, error)
- func (cc *ConformanceContainer) GetStatus(ctx context.Context) (v1.ContainerStatus, error)
- func (cc *ConformanceContainer) IsReady(ctx context.Context) (bool, error)
- func (cc *ConformanceContainer) Present(ctx context.Context) (bool, error)
- type ContainerState
- type KubeletManagedHostConfig
- type PrivilegedPodTestConfig
- type UserNamespacedPodsMetrics
Constants ¶
const ( // ContainerStatusRetryTimeout represents polling threshold before giving up to get the container status ContainerStatusRetryTimeout = time.Minute * 5 // ContainerStatusPollInterval represents duration between polls to get the container status ContainerStatusPollInterval = time.Second * 1 )
Variables ¶
var SIGDescribe = framework.SIGDescribe("node")
Functions ¶
func GetContainerStartedTime ¶
GetContainerStartedTime returns the time when the given container started and error if any
func GetTransitionTimeForReadyCondition ¶
GetTransitionTimeForReadyCondition returns the time when the given pod became ready and error if any
func ImagePullTest ¶
func ImagePullTest(ctx context.Context, f *framework.Framework, image string, imagePullPolicy v1.PullPolicy, pullSecret *v1.Secret, nodeName string, expectedPhase v1.PodPhase, expectedPullStatus bool) *v1.Pod
Images used by imagePullTest are not added to NodePrePullImageList because this test is specifically testing image pulling behavior. The containers use ImagePullPolicy values other than PullNever, so the framework allows them to be pulled during the test.
func RunLivenessTest ¶
func RunSidecarLivenessTest ¶ added in v1.28.0
func VerifyPodLevelStatus ¶
Types ¶
type ConformanceContainer ¶
type ConformanceContainer struct {
Container v1.Container
RestartPolicy v1.RestartPolicy
Volumes []v1.Volume
ImagePullSecrets []string
NodeName string
PodClient *e2epod.PodClient
PodSecurityContext *v1.PodSecurityContext
// contains filtered or unexported fields
}
ConformanceContainer defines the types for running container conformance test cases One pod one container
func (*ConformanceContainer) Create ¶
func (cc *ConformanceContainer) Create(ctx context.Context) *v1.Pod
Create creates the defined conformance container
func (*ConformanceContainer) Delete ¶
func (cc *ConformanceContainer) Delete(ctx context.Context) error
Delete deletes the defined conformance container
func (*ConformanceContainer) GetPhase ¶
GetPhase returns the phase of the pod lifecycle and error if any
func (*ConformanceContainer) GetStatus ¶
func (cc *ConformanceContainer) GetStatus(ctx context.Context) (v1.ContainerStatus, error)
GetStatus returns the details of the current status of this container and error if any
type ContainerState ¶
type ContainerState string
ContainerState represents different states of its lifecycle
const ( // ContainerStateWaiting represents 'Waiting' container state ContainerStateWaiting ContainerState = "Waiting" // ContainerStateRunning represents 'Running' container state ContainerStateRunning ContainerState = "Running" // ContainerStateTerminated represents 'Terminated' container state ContainerStateTerminated ContainerState = "Terminated" // ContainerStateUnknown represents 'Unknown' container state ContainerStateUnknown ContainerState = "Unknown" )
func GetContainerState ¶
func GetContainerState(state v1.ContainerState) ContainerState
GetContainerState returns current state the container represents among its lifecycle
type KubeletManagedHostConfig ¶
type KubeletManagedHostConfig struct {
// contains filtered or unexported fields
}
KubeletManagedHostConfig defines the types for running managed etc hosts test cases
type PrivilegedPodTestConfig ¶
type PrivilegedPodTestConfig struct {
// contains filtered or unexported fields
}
PrivilegedPodTestConfig is configuration struct for privileged pod test TODO: Merge with tests in security_context.go
type UserNamespacedPodsMetrics ¶ added in v1.34.0
Source Files
¶
- configmap.go
- container.go
- container_probe.go
- containers.go
- downwardapi.go
- ephemeral_containers.go
- expansion.go
- file_key.go
- framework.go
- image_credential_provider.go
- init_container.go
- kubelet.go
- kubelet_etc_hosts.go
- lease.go
- lifecycle_hook.go
- node_lease.go
- pod_admission.go
- pod_hostnameoverride.go
- pod_level_resources.go
- pod_level_resources_resize.go
- pod_resize.go
- pods.go
- podtemplates.go
- privileged.go
- runtime.go
- runtimeclass.go
- secrets.go
- security_context.go
- sysctl.go