# Packages
No description provided by the author
Package config simplifies the declaration of configuration options.
No description provided by the author
No description provided by the author
No description provided by the author
Package ginkgowrapper wraps Ginkgo Fail and Skip functions to panic with structured data instead of a constant string.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package log will be removed after switching to use core framework log.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package podlogs enables live capturing of all events and log messages for some or all pods in a namespace as they get generated.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package testfiles provides a wrapper around various optional ways of retrieving additional files needed during a test run: - builtin bindata - filesystem access
Because it is a is self-contained package, it can be used by test/e2e/framework and test/e2e/manifest without creating a circular dependency.
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
AddCleanupAction installs a function that will be called in the event of the whole test being terminated.
AddOrUpdateAvoidPodOnNode adds avoidPods annotations to node, will override if it exists.
AddOrUpdateLabelOnNode adds the given label key and value to the given node or updates value.
AddOrUpdateLabelOnNodeAndReturnOldValue adds the given label key and value to the given node or updates value and returns the old label value.
AddOrUpdateTaintOnNode adds the given taint to the given node or updates taint.
AfterReadingAllFlags makes changes to the context after all flags have been read.
AfterSuiteActions are actions that are run on ginkgo's SynchronizedAfterSuite.
AllNodesReady checks whether all registered nodes are ready.
AssertCleanup asserts that cleanup of a namespace wrt selectors occurred.
BlockNetwork blocks network between the given from value and the given to value.
CheckConnectivityToHost launches a pod to test connectivity to the specified host.
CheckForControllerManagerHealthy checks that the controller manager does not crash within "duration".
CheckInvariants checks for invariant of the each events.
CheckReachabilityFromPod checks reachability from the specified pod.
CheckTestingNSDeletedExcept checks whether all e2e based existing namespaces are in the Terminating state and waits until they are finally deleted.
Cleanup stops everything from filePath from namespace ns and checks if everything matching selectors from the given namespace is correctly stopped.
CleanupSuite is the boilerplate that can be used after tests on ginkgo were run, on the SynchronizedAfterSuite step.
ConformanceIt is wrapper function for ginkgo It.
ContainerInitInvariant checks for an init containers are initialized and invariant on both older and newer.
CoreDump SSHs to the master and all nodes and dumps their logs into dir.
CreateEmptyFileOnPod creates empty file at given path on the pod.
CreateManagedInstanceGroup creates a Compute Engine managed instance group.
CreateTestingNS should be used by every test, note that we append a common prefix to the provided test name.
DeleteManagedInstanceGroup deletes Google Compute Engine managed instance group.
DeleteNamespaces deletes all namespaces that match the given delete and skip filters.
DeleteNodeOnCloudProvider deletes the specified node.
DeleteRCAndWaitForGC deletes only the Replication Controller and waits for GC to delete the pods.
DeleteResourceAndWaitForGC deletes only given resource and waits for GC to delete the pods.
DescribeIng describes information of ingress by running kubectl describe ing.
DescribeItem always returns a string that describes the item, usually by calling out to cache.MetaNamespaceKeyFunc which concatenates namespace (if set) and name.
DsFromManifest reads a .json/yaml file and returns the daemonset in it.
DumpAllNamespaceInfo dumps events, pods and nodes information in the given namespace.
DumpDebugInfo dumps debug info of tests.
DumpEventsInNamespace dumps events in the given namespace.
DumpNodeDebugInfo dumps debug information of the given nodes.
EnsureLoadBalancerResourcesDeleted ensures that cloud load balancer resources that were created are actually cleaned up.
EtcdUpgrade upgrades etcd on GCE.
ExpectEqual expects the specified two are the same, otherwise an exception raises.
ExpectError expects an error happens, otherwise an exception raises.
ExpectNodeHasLabel expects that the given node has the given label pair.
ExpectNodeHasTaint expects that the node has the given taint.
ExpectNoError checks if "err" is set, and if so, fails assertion while logging the error.
ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f").
ExpectNoErrorWithRetries checks if an error occurs with the given retry count.
ExpectNotEqual expects the specified two are not the same, otherwise an exception raises.
Fail is a replacement for ginkgo.Fail which logs the problem as it occurs together with a stack trace and then calls ginkgowrapper.Fail.
Failf logs the fail info, including a stack trace.
FailfWithOffset calls "Fail" and logs the error with a stack trace that starts at "offset" levels above its caller (for example, for call chain f -> g -> FailfWithOffset(1, ...) error would be logged for "f").
GatherCPUProfile gathers CPU profile.
GatherCPUProfileForSeconds gathers CPU profile for specified seconds.
GatherMemoryProfile gathers memory profile.
GenerateMasterRegexp returns a regex for matching master node name.
GetAllMasterAddresses returns all IP addresses on which the kubelet can reach the master.
GetClusterZones returns the values of zone label collected from all nodes.
GetFileModeRegex returns a file mode related regex which should be matched by the mounttest pods' output.
GetGroupNodes returns a node name for the specified node group.
GetHostAddress gets the node for a pod and returns the first address.
GetHostExternalAddress gets the node for a pod and returns the first External address.
GetKubemarkMasterComponentsResourceUsage returns the resource usage of kubemark which contains multiple combinations of cpu and memory usage for each pod name.
GetLogToFileFunc is a convenience function that returns a function that have the same interface as e2elog.Logf, but writes to a specified file.
GetManagedInstanceGroupTemplateName returns the list of Google Compute Engine managed instance groups.
GetMasterHost returns a hostname of a master.
GetPodSecretUpdateTimeout reuturns the timeout duration for updating pod secret.
GetProviders returns the names of all currently registered providers.
GroupSize returns the size of an instance group.
KubectlCmd runs the kubectl executable through the wrapper script.
KubectlVersion gets the version of kubectl that's currently being used (see --kubectl-path in e2e.go to use an alternate kubectl).
KubeDescribe is wrapper function for ginkgo describe.
ListNamespaceEvents lists the events in the given namespace.
LoadClientset returns clientset for connecting to kubernetes clusters.
LoadConfig returns a config for a rest client.
LogClusterImageSources writes out cluster image sources.
Logf logs the info.
LogFailedContainers runs `kubectl logs` on a failed containers.
LookForString looks for the given string in the output of fn, repeatedly calling fn until the timeout is reached or the string is found.
LookForStringInLog looks for the given string in the log of a specific pod container.
LookForStringInPodExec looks for the given string in the output of a command executed in a specific pod container.
MasterOSDistroIs returns true if the master OS distro is included in the supportedMasterOsDistros.
MasterUpgrade upgrades master node on GCE/GKE.
MasterUpgradeGCEWithKubeProxyDaemonSet upgrades master node on GCE with enabling/disabling the daemon set of kube-proxy.
MigTemplate (GCE-only) returns the name of the MIG template that the nodes of the cluster use.
NewCoreNetworkingTestConfig creates and sets up a new test config helper for Node E2E.
NewDefaultFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
NewE2ETestNodePreparer returns a new instance of E2ETestNodePreparer.
NewFlakeReport returns a new flake report.
NewFramework creates a test framework.
NewKubectlCommand returns a KubectlBuilder for running kubectl.
NewLogsVerifier creates a new LogsSizeVerifier which will stop when stopChannel is closed.
NewNetworkingTestConfig creates and sets up a new test config helper.
NewNodeKiller creates new NodeKiller.
NewResourceUsageGatherer returns a new ContainerResourceGatherer.
NodeHasTaint returns true if the node has the given taint, else returns false.
NodeOSDistroIs returns true if the node OS distro is included in the supportedNodeOsDistros.
NodeUpgrade upgrades nodes on GCE/GKE.
NodeUpgradeGCEWithKubeProxyDaemonSet upgrades nodes on GCE with enabling/disabling the daemon set of kube-proxy.
OpenWebSocketForURL constructs a websocket connection to the provided URL, using the client config, with the specified protocols.
ParseKVLines parses output that looks like lines containing "<key>: <val>" and returns <val> if <key> is found.
PokeHTTP tries to connect to a host on a port for a given URL path.
PokeUDP tries to connect to a host on a port and send the given request.
PollURL polls till the url responds with a healthy http code.
PreconfiguredRuntimeClassHandler returns configured runtime handler.
PrettyPrint returns a human-readable representation of an item.
PrettyPrintJSON converts metrics to JSON format.
PrintSummaries prints summaries of tests.
ProviderIs returns true if the provider is included is the providers.
ProxyMode returns a proxyMode of a kube-proxy.
PrunedStack is a wrapper around debug.Stack() that removes information about the current goroutine and optionally skips some of the initial stack entries.
RandomSuffix provides a random string to append to pods,services,rcs.
RcByNameContainer returns a ReplicationController with specified name and container.
RcByNamePort returns a ReplicationController with specified name and port.
RegisterClusterFlags registers flags specific to the cluster e2e test suite.
RegisterCommonFlags registers flags common to all e2e test suites.
RegisterNodeFlags registers flags specific to the node e2e test suite.
RegisterProvider is expected to be called during application init, typically by an init function in a provider package.
RemoveAvoidPodsOffNode removes AvoidPods annotations from the node.
RemoveCleanupAction removes a function that was installed by AddCleanupAction.
RemoveLabelOffNode is for cleaning up labels temporarily added to node, won't fail if target label doesn't exist or has been removed.
RemoveTaintOffNode removes the given taint from the given node.
ResizeGroup resizes an instance group.
RestartApiserver restarts the kube-apiserver.
RestartControllerManager restarts the kube-controller-manager.
RestartKubelet restarts kubelet on the given host.
RestartKubeProxy restarts kube-proxy on the given host.
RestclientConfig returns a config holds the information needed to build connection to kubernetes clusters.
RunCleanupActions runs all functions installed by AddCleanupAction.
RunCmd runs cmd using args and returns its stdout and stderr.
RunCmdEnv runs cmd with the provided environment and args and returns its stdout and stderr.
RunHostCmd runs the given cmd in the context of the given pod using `kubectl exec` inside of a shell.
RunHostCmdOrDie calls RunHostCmd and dies on error.
RunHostCmdWithRetries calls RunHostCmd and retries all errors until it succeeds or the specified timeout expires.
RunIfContainerRuntimeIs runs if the container runtime is included in the runtimes.
RunIfSystemSpecNameIs runs if the system spec name is included in the names.
RunKubectl is a convenience wrapper over kubectlBuilder.
RunKubectlInput is a convenience wrapper over kubectlBuilder that takes input to stdin.
RunKubectlOrDie is a convenience wrapper over kubectlBuilder.
RunKubectlOrDieInput is a convenience wrapper over kubectlBuilder that takes input to stdin.
RunKubemciCmd is a convenience wrapper over kubectlBuilder to run kubemci.
RunKubemciWithKubeconfig is a convenience wrapper over RunKubemciCmd.
RunRC Launches (and verifies correctness) of a Replication Controller and will wait for all pods it spawns to become "Running".
ScaleRC scales Replication Controller to be desired size.
ScaleResource scales resource to the given size.
ServerVersionGTE returns true if v is greater than or equal to the server version.
SetupProviderConfig validates the chosen provider and creates an interface instance for it.
SetupSuite is the boilerplate that can be used to setup ginkgo test suites, on the SynchronizedBeforeSuite step.
SetupSuitePerGinkgoNode is the boilerplate that can be used to setup ginkgo test suites, on the SynchronizedBeforeSuite step.
SimpleGET executes a get on the given url, returns error if non-200 returned.
Skipf skips with information about why the test is being skipped.
SkipIfContainerRuntimeIs skips if the container runtime is included in the runtimes.
SkipIfMissingResource skips if the gvr resource is missing.
SkipIfMultizone skips if the cluster has multizone.
SkipIfNodeOSDistroIs skips if the node OS distro is included in the unsupportedNodeOsDistros.
SkipIfProviderIs skips if the provider is included in the unsupportedProviders.
SkipUnlessAtLeast skips if the value is less than the minValue.
SkipUnlessLocalEphemeralStorageEnabled skips if the LocalStorageCapacityIsolation is not enabled.
SkipUnlessMasterOSDistroIs skips if the master OS distro is not included in the supportedMasterOsDistros.
SkipUnlessMultizone skips if the cluster does not have multizone.
SkipUnlessNodeCountIsAtLeast skips if the number of nodes is less than the minNodeCount.
SkipUnlessNodeCountIsAtMost skips if the number of nodes is greater than the maxNodeCount.
SkipUnlessNodeOSDistroIs skips if the node OS distro is not included in the supportedNodeOsDistros.
SkipUnlessPrometheusMonitoringIsEnabled skips if the prometheus monitoring is not enabled.
SkipUnlessProviderIs skips if the provider is not included in the supportedProviders.
SkipUnlessServerVersionGTE skips if the server version is less than v.
SkipUnlessSSHKeyPresent skips if no SSH key is found.
SkipUnlessTaintBasedEvictionsEnabled skips if the TaintBasedEvictions is not enabled.
StartCmdAndStreamOutput returns stdout and stderr after starting the given cmd.
StartCPUProfileGatherer performs polling-based gathering of the component's CPU profile.
TestHitNodesFromOutside checkes HTTP connectivity from outside.
TestHitNodesFromOutsideWithCount checkes HTTP connectivity from outside with count.
TestUnderTemporaryNetworkFailure blocks outgoing network traffic on 'node'.
TranslateIPv4ToIPv6 maps an IPv4 address into a valid IPv6 address adding the well known prefix "0::ffff:" https://tools.ietf.org/html/rfc2765 if the ip is IPv4 and the cluster IPFamily is IPv6, otherwise returns the same ip.
TryKill is rough equivalent of ctrl+c for cleaning up processes.
UnblockNetwork unblocks network between the given from value and the given to value.
UpdateDaemonSetWithRetries updates daemonsets with the given applyUpdate func until it succeeds or a timeout expires.
UpdateReplicationControllerWithRetries retries updating the given rc on conflict with the following steps: 1.
ValidateController is a generic mechanism for testing RC's that are running.
WaitForAllNodesSchedulable waits up to timeout for all (but TestContext.AllowedNotReadyNodes) to become scheduable.
WaitForApiserverUp waits for the kube-apiserver to be up.
WaitForControllerManagerUp waits for the kube-controller-manager to be up.
WaitForDaemonSets for all daemonsets in the given namespace to be ready (defined as all but 'allowedNotReadyNodes' pods associated with that daemonset are ready).
WaitForDefaultServiceAccountInNamespace waits for the default service account to be provisioned the default service account is what is associated with pods when they do not specify a service account as a result, pods are not able to be provisioned in a namespace until the service account is provisioned.
WaitForGroupSize waits for node instance group reached the desired size.
WaitForKubeletUp waits for the kubelet on the given host to be up.
WaitForMasters waits until the cluster has the desired number of ready masters in it.
WaitForNamespacesDeleted waits for the namespaces to be deleted.
WaitForNodeHasTaintOrNot waits for a taint to be added/removed from the node until timeout occurs, whichever comes first.
WaitForPersistentVolumeClaimDeleted waits for a PersistentVolumeClaim to be removed from the system until timeout occurs, whichever comes first.
WaitForPersistentVolumeDeleted waits for a PersistentVolume to get deleted or until timeout occurs, whichever comes first.
WaitForRCPodToDisappear returns nil if the pod from the given replication controller (described by rcName) no longer exists.
WaitForRCToStabilize waits till the RC has a matching generation/replica count between spec and status.
WaitForReplicationController waits until the RC appears (exist == true), or disappears (exist == false).
WaitForReplicationControllerwithSelector waits until any RC with given selector appears (exist == true), or disappears (exist == false).
WaitForService waits until the service appears (exist == true), or disappears (exist == false).
WaitForServiceEndpointsNum waits until the amount of endpoints that implement service to expectNum.
WaitForServiceWithSelector waits until any service with given selector appears (exist == true), or disappears (exist == false).
WaitForStableCluster waits until all existing pods are scheduled and returns their amount.
WaitForStatefulSetReplicasReady waits for all replicas of a StatefulSet to become ready or until timeout occurs, whichever comes first.
# Constants
AllNodes means all containers on all nodes.
ClaimDeletingTimeout is How long claims have to become deleted.
ClaimProvisionShortTimeout is same as `ClaimProvisionTimeout` to wait for claim to be dynamically provisioned, but shorter.
ClaimProvisionTimeout is how long claims have to become dynamically provisioned.
ClusterHTTPPort is a cluster HTTP port for testing.
ClusterUDPPort is a cluster UDP port for testing.
DefaultCPUProfileSeconds is default value for how long the CPU profile is gathered for.
DefaultNamespaceDeletionTimeout is timeout duration for waiting for a namespace deletion.
DefaultNumNodes is the number of nodes.
DefaultPodDeletionTimeout is the default timeout for deleting pod.
EndpointHTTPPort is an endpoint HTTP port for testing.
EndpointUDPPort is an endpoint UDP port for testing.
HTTPBadResponse is HTTP poke status which is bad response.
HTTPError is HTTP poke status which is error.
HTTPRefused is HTTP poke status which is connection refused.
HTTPRetryCode is HTTP poke status which is retry code.
HTTPSuccess is HTTP poke status which is success.
HTTPTimeout is HTTP poke status which is timeout.
HTTPWrongCode is HTTP poke status which is wrong code.
MasterAndDNSNodes means all containers on Master nodes and DNS containers on other nodes.
MasterNodes means all containers on Master nodes only.
NamespaceCleanupTimeout is how long to wait for the namespace to be deleted.
NoCPUConstraint is the number of constraint for CPU.
NodeReadyInitialTimeout is how long nodes have to be "ready" when a test begins.
PodDeleteTimeout is how long to wait for a pod to be deleted.
PodEventTimeout is how much we wait for a pod event to occur.
PodListTimeout is how long to wait for the pod to be listable.
PodReadyBeforeTimeout is how long pods have to be "ready" when a test begins.
PodStartShortTimeout is same as `PodStartTimeout` to wait for the pod to be started, but shorter.
PodStartTimeout is how long to wait for the pod to be started.
Poll is how often to Poll pods, nodes and claims.
PollShortTimeout is the short timeout value in polling.
RecreateNodeReadyAgainTimeout is how long a node is allowed to become "Ready" after it is recreated before the test is considered failed.
RegexIPv4 is a regex to match IPv4 addresses.
RegexIPv6 is a regex to match IPv6 addresses.
RestartNodeReadyAgainTimeout is how long a node is allowed to become "Ready" after it is restarted before the test is considered failed.
RestartPodReadyAgainTimeout is how long a pod is allowed to become "running" and "ready" after a node restart before test is considered failed.
ServiceAccountProvisionTimeout is how long to wait for a service account to be provisioned.
ServiceStartTimeout is how long to wait for a service endpoint to be resolvable.
SessionAffinityChecks is number of checks to hit a given set of endpoints when enable session affinity.
SingleCallTimeout is how long to try single API calls (like 'get' or 'list').
SnapshotCreateTimeout is how long for snapshot to create snapshotContent.
UDPBadResponse is UDP poke status which is bad response.
UDPError is UDP poke status which is error.
UDPRefused is UDP poke status which is connection refused.
UDPSuccess is UDP poke status which is success.
UDPTimeout is UDP poke status which is timeout.
# Variables
AgnHostImage is the image URI of AgnHost.
BusyBoxImage is the image URI of BusyBox.
ImageWhiteList is the images used in the current test suite.
NetexecImageName is the image name for agnhost.
ProvidersWithSSH are those providers where each node is accessible with SSH.
RunID is a unique identifier of the e2e run.
ServeHostnameImage is a serve hostname image name.
TestContext should be used by all tests to access common context data.
# Structs
CloudConfig holds the cloud configuration for e2e test suites.
ClusterVerification is a struct for a verification of cluster state.
ContainerResourceGatherer is a struct for gathering container resource.
E2ETestNodePreparer implements testutils.TestNodePreparer interface, which is used to create/modify Nodes before running a test.
ExecOptions passed to ExecWithOptions.
FlakeReport is a struct for managing the flake report.
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.
HTTPPokeParams is a struct for HTTP poke parameters.
HTTPPokeResult is a struct for HTTP poke result.
KubeCluster is a struct for managing kubernetes cluster info.
KubeConfig is a struct for managing kubernetes config.
KubectlBuilder is used to build, customize and execute a kubectl Command.
KubemarkResourceUsage is a struct for tracking the resource usage of kubemark.
KubeUser is a struct for managing kubernetes user info.
LogSizeGatherer is a worker which grabs a WorkItem from the channel and does assigned work.
LogsSizeData is a structure for handling timeseries of log size data and lock.
LogsSizeVerifier gathers data about log files sizes from master and node machines.
NetworkingTestConfig is a convenience class around some utility methods for testing kubeproxy/networking/services/endpoints.
NodeKiller is a utility to simulate node failures.
NodeKillerConfig describes configuration of NodeKiller -- a utility to simulate node failures.
NodeTestContextType is part of TestContextType, it is shared by all node e2e test.
NullProvider is the default implementation of the ProviderInterface which doesn't do anything.
Options is a struct for managing test framework options.
PodClient is a struct for pod client.
PodStateVerification represents a verification of pod state.
ResourceConstraint is a struct to hold constraints.
ResourceGathererOptions is a struct to hold options for resource.
SingleContainerSummary is a struct to hold single container summary.
SingleLogSummary is a structure for handling average generation rate and number of probes.
TestContextType contains test settings and global state.
TimestampedSize contains a size together with a time of measurement.
UDPPokeParams is a struct for UDP poke parameters.
UDPPokeResult is a struct for UDP poke result.
What is a subset of metav1.TypeMeta which (in contrast to metav1.TypeMeta itself) satisfies the runtime.Object interface.
WorkItem is a command for a worker that contains an IP of machine from which we want to gather data and paths to all files we're interested in.
# Interfaces
ItemFactory provides support for creating one particular item.
ProviderInterface contains the implementation for certain provider-specific functionality.
TestDataSummary is an interface for managing test data.
# Type aliases
ClientConfigGetter is a func that returns getter to return a config.
CreateTestingNSFn is a func that is responsible for creating namespace used for executing e2e tests.
EventsLister is a func that lists events.
Factory is a func which operates provider specific behavior.
HTTPPokeStatus is string for representing HTTP poke status.
InvariantFunc is a func that checks for invariant.
LogSizeDataTimeseries is map of timestamped size.
LogsSizeDataSummary is map of log summary.
NodesSet is a value of nodes set.
ResourceUsageSummary is a struct to hold resource usage summary.
UDPPokeStatus is string for representing UDP poke status.