kubernetes: k8s.io/kubernetes/test/e2e/common Index | Files

package common

import "k8s.io/kubernetes/test/e2e/common"


Package Files

apparmor.go configmap.go configmap_volume.go container.go container_probe.go docker_containers.go downward_api.go downwardapi_volume.go empty_dir.go events.go expansion.go host_path.go init_container.go kubelet.go kubelet_etc_hosts.go lease.go lifecycle_hook.go networking.go node_lease.go pods.go privileged.go projected_combined.go projected_configmap.go projected_downwardapi.go projected_secret.go runtime.go runtimeclass.go secrets.go secrets_volume.go security_context.go sysctl.go util.go volumes.go


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


var AppArmorDistros = []string{"gci", "ubuntu"}

AppArmorDistros are distros with AppArmor support

var CommonImageWhiteList = sets.NewString(

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

func CreateAppArmorTestPod Uses

func CreateAppArmorTestPod(f *framework.Framework, unconfined bool, runOnce bool) *v1.Pod

CreateAppArmorTestPod creates a pod that tests apparmor profile enforcement. The pod exits with an error code if the profile is incorrectly enforced. If runOnce is true the pod will exit after a single test, otherwise it will repeat the test every 1 second until failure.

func GetContainerStartedTime Uses

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

func GetTransitionTimeForReadyCondition Uses

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

func IsAppArmorSupported Uses

func IsAppArmorSupported() bool

func LoadAppArmorProfiles Uses

func LoadAppArmorProfiles(f *framework.Framework)

func NewRCByName Uses

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 Uses

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

NewSVCByName creates a service by name.

func ObserveEventAfterAction Uses

func ObserveEventAfterAction(f *framework.Framework, eventPredicate func(*v1.Event) bool, action Action) (bool, error)

Returns true if an event matching the predicate was emitted from the system after performing the supplied action.

func ObserveNodeUpdateAfterAction Uses

func ObserveNodeUpdateAfterAction(f *framework.Framework, nodeName string, nodePredicate func(*v1.Node) bool, action Action) (bool, error)

Returns true if a node update matching the predicate was emitted from the system after performing the supplied action.

func RestartNodes Uses

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

RestartNodes restarts specific nodes.

func RunLivenessTest Uses

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

func SkipIfAppArmorNotSupported Uses

func SkipIfAppArmorNotSupported()

func SubstituteImageName Uses

func SubstituteImageName(content string) string

SubstituteImageName replaces image name in content.

func WaitTimeoutForEvent Uses

func WaitTimeoutForEvent(c clientset.Interface, namespace, eventSelector, msg string, timeout time.Duration) error

WaitTimeoutForEvent waits the given timeout duration for an event to occur.

type Action Uses

type Action func() error

type ConformanceContainer Uses

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 Uses

func (cc *ConformanceContainer) Create()

func (*ConformanceContainer) Delete Uses

func (cc *ConformanceContainer) Delete() error

func (*ConformanceContainer) GetPhase Uses

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

func (*ConformanceContainer) GetStatus Uses

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

func (*ConformanceContainer) IsReady Uses

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

func (*ConformanceContainer) Present Uses

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

type ContainerState Uses

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

func GetContainerState Uses

func GetContainerState(state v1.ContainerState) ContainerState

type KubeletManagedHostConfig Uses

type KubeletManagedHostConfig struct {
    // contains filtered or unexported fields

type PrivilegedPodTestConfig Uses

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 Uses

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.

Package common imports 56 packages (graph) and is imported by 433 packages. Updated 2019-11-11. Refresh now. Tools for package owners.