common

package
v1.19.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 58 Imported by: 310

Documentation

Index

Constants

View Source
const (
	ContainerStatusRetryTimeout = time.Minute * 5
	ContainerStatusPollInterval = time.Second * 1
)

Variables

PrePulledImages are a list of images used in e2e/common tests. These images should be prepulled before tests starts, so that the tests won't fail due image pulling flakes. Currently, this is only used by node e2e test. See also updateImageAllowList() in ../../e2e_node/image_list.go TODO(random-liu): Change the image puller pod to use similar mechanism.

Functions

func GetContainerStartedTime added in v1.16.0

func GetContainerStartedTime(p *v1.Pod, containerName string) (time.Time, error)

func GetTransitionTimeForReadyCondition added in v1.16.0

func GetTransitionTimeForReadyCondition(p *v1.Pod) (time.Time, error)

func NewRCByName added in v1.8.0

func NewRCByName(c clientset.Interface, ns, name string, replicas int32, gracePeriod *int64, containerArgs []string) (*v1.ReplicationController, error)

NewRCByName creates a replication controller with a selector by name of name.

func NewSVCByName added in v1.8.0

func NewSVCByName(c clientset.Interface, ns, name string) error

NewSVCByName creates a service by name.

func RestartNodes added in v1.8.0

func RestartNodes(c clientset.Interface, nodes []v1.Node) error

RestartNodes restarts specific nodes.

func RunLivenessTest added in v1.16.0

func RunLivenessTest(f *framework.Framework, pod *v1.Pod, expectNumRestarts int, timeout time.Duration)

func SubstituteImageName added in v1.14.0

func SubstituteImageName(content string) string

SubstituteImageName replaces image name in content.

Types

type ConformanceContainer added in v1.12.0

type ConformanceContainer struct {
	Container        v1.Container
	RestartPolicy    v1.RestartPolicy
	Volumes          []v1.Volume
	ImagePullSecrets []string

	PodClient *framework.PodClient

	PodSecurityContext *v1.PodSecurityContext
	// contains filtered or unexported fields
}

One pod one container

func (*ConformanceContainer) Create added in v1.12.0

func (cc *ConformanceContainer) Create()

func (*ConformanceContainer) Delete added in v1.12.0

func (cc *ConformanceContainer) Delete() error

func (*ConformanceContainer) GetPhase added in v1.12.0

func (cc *ConformanceContainer) GetPhase() (v1.PodPhase, error)

func (*ConformanceContainer) GetStatus added in v1.12.0

func (cc *ConformanceContainer) GetStatus() (v1.ContainerStatus, error)

func (*ConformanceContainer) IsReady added in v1.12.0

func (cc *ConformanceContainer) IsReady() (bool, error)

func (*ConformanceContainer) Present added in v1.12.0

func (cc *ConformanceContainer) Present() (bool, error)

type ContainerState added in v1.12.0

type ContainerState string
const (
	ContainerStateWaiting    ContainerState = "Waiting"
	ContainerStateRunning    ContainerState = "Running"
	ContainerStateTerminated ContainerState = "Terminated"
	ContainerStateUnknown    ContainerState = "Unknown"
)

func GetContainerState added in v1.12.0

func GetContainerState(state v1.ContainerState) ContainerState

type KubeletManagedHostConfig

type KubeletManagedHostConfig struct {
	// contains filtered or unexported fields
}

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 Suite

type Suite string

Suite represents test suite.

const (
	// E2E represents a test suite for e2e.
	E2E Suite = "e2e"
	// NodeE2E represents a test suite for node e2e.
	NodeE2E Suite = "node e2e"
)
var CurrentSuite Suite

CurrentSuite represents current test suite.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL