package
1.7.0-alpha.0
Repository: https://github.com/kmova/kubernetes.git
Documentation: pkg.go.dev

# Functions

AddCleanupAction installs a function that will be called in the event of the whole test being terminated.
No description provided by the author
No description provided by the author
Checks whether all registered nodes are ready.
ApiCallToPerfData transforms APIResponsiveness to PerfData.
Asserts that cleanup of a namespace wrt selectors occurred.
BindClusterRole binds the cluster role at the cluster scope.
BindClusterRoleInNamespace binds the cluster role at the namespace scope.
The following helper functions can block/unblock network from source host to destination host by manipulating iptable rules.
CheckConnectivityToHost launches a pod running wget on the specified node to test connectivity to the specified host.
No description provided by the author
CheckNewRSAnnotations check if the new RS's annotation is as expected.
CheckNodesReady waits up to nt for expect nodes accessed by c to be ready, returning an error if this doesn't happen in time.
No description provided by the author
CheckPodsCondition returns whether all pods whose names are listed in podNames in namespace ns are in the condition, using c and waiting at most timeout.
CheckPodsRunningReady returns whether all pods whose names are listed in podNames in namespace ns are running and ready, using c and waiting at most timeout.
CheckPodsRunningReadyOrSucceeded returns whether all pods whose names are listed in podNames in namespace ns are running and ready, or succeeded; use c and waiting at most timeout.
No description provided by the author
No description provided by the author
CheckTestingNSDeletedExcept checks whether all e2e based existing namespaces are in the Terminating state and waits until they are finally deleted.
Stops everything from filePath from namespace ns and checks if everything matching selectors from the given namespace is correctly stopped.
CleanupGCEResources cleans up GCE Service Type=LoadBalancer resources with the given name.
No description provided by the author
No description provided by the author
ConstructFirewallForLBService returns the expected GCE firewall rule for a loadbalancer type service.
No description provided by the author
CoreDump SSHs to the master and all nodes and dumps their logs into dir.
CPUUsageToPerfData transforms NodesCPUSummary to PerfData.
CPUUsageToPerfDataWithLabels transforms NodesCPUSummary to PerfData with additional labels.
CreateExecPodOrFail creates a simple busybox pod in a sleep loop used as a vessel for kubectl exec commands.
No description provided by the author
No description provided by the author
CreateStatefulSetService creates a Headless Service with Name name and Selector set to match labels.
CreateTestingNS should be used by every test, note that we append a common prefix to the provided test name.
DeleteAllStatefulSets deletes all StatefulSet API Objects in Namespace ns.
No description provided by the author
DeleteNamespaces deletes all namespaces that match the given delete and skip filters.
No description provided by the author
No description provided by the author
DeleteRCAndWaitForGC deletes only the Replication Controller and waits for GC to delete the pods.
Delete a ReplicaSet and all pods it spawned.
DeleteResourceAndPods deletes a given resource and all pods it spawned.
DeleteResourceAndWaitForGC deletes only given resource and waits for GC to delete the pods.
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
EnsureLoadBalancerResourcesDeleted ensures that cloud load balancer resources that were created are actually cleaned up.
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
Filters nodes in NodeList in place, removing nodes that do not satisfy the given condition TODO: consider merging with pkg/client/cache.NodeLister.
FormatRuntimeOperationErrorRate formats the runtime operation error rate to string.
No description provided by the author
GetClusterIpRange returns the CLUSTER_IP_RANGE env we set for e2e cluster.
GetClusterName returns the CLUSTER_NAME env we set for e2e cluster.
No description provided by the author
GetE2eFirewalls returns all firewall rules we create for an e2e cluster.
GetHostExternalAddress gets the node for a pod and returns the first External address.
No description provided by the author
GetInstancePrefix returns the INSTANCE_PREFIX env we set for e2e cluster.
GetInstanceTags gets tags from GCE instance with given name.
No description provided by the author
GetKubeletLatencyMetrics gets all latency related kubelet metrics.
GetKubeletPods retrieves the list of pods on the kubelet.
GetKubeletRunningPods retrieves the list of running pods on the kubelet.
TODO: figure out how to move this to kubemark directory (need to factor test SSH out of e2e framework).
GetMasterAddress returns the hostname/external IP/internal IP as appropriate for e2e tests on a particular provider which is the address of the interface used for communication with the kubelet.
GetMasterAndWorkerNodesOrDie will return a list masters and schedulable worker nodes.
No description provided by the author
No description provided by the author
GetNodeExternalIP returns node external IP concatenated with port 22 for ssh e.g.
GetNodePortURL returns the url to a nodeport Service.
No description provided by the author
GetNodeTags gets tags from one of the Kubernetes nodes.
GetPauseImageName fetches the pause image name for the same architecture as the apiserver.
GetPauseImageNameForHostArch fetches the pause image name for the same architecture the test is running on.
TODO(random-liu): Change this to be a member function of the framework.
No description provided by the author
GetPodsScheduled returns a number of currently scheduled and not scheduled Pods.
GetReadySchedulableNodesOrDie addresses the common use case of getting nodes you can do work on.
GetServerArchitecture fetches the architecture of the cluster's apiserver.
No description provided by the author
GetSigner returns an ssh.Signer for the provider ("gce", etc.) that can be used to SSH to their nodes.
GetValidDNSSubdomainName massages the given name to be a valid dns subdomain name.
HighLatencyKubeletOperations logs and counts the high latency metrics exported by the kubelet server via /metrics.
Prints top five summary metrics for request types with latency and returns number of such request types above threshold.
IsHTTPErrorCode returns true if the error is a google api error matching the corresponding HTTP error code.
No description provided by the author
No description provided by the author
No description provided by the author
IsStatefulSetPodInitialized returns true if pod's StatefulSetInitAnnotation exists and is set to true.
No description provided by the author
No description provided by the author
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).
KubectlVersionGTE returns true if the kubectl version is greater than or equal to v.
Wrapper function for ginkgo describe.
LaunchHostExecPod launches a hostexec pod in the given namespace and waits until it's Running.
LaunchWebserverPod launches a pod serving http on port 8080 to act as the target for networking connectivity checks.
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
No description provided by the author
LogSuspiciousLatency logs metrics/docker errors from all nodes that had slow startup times If latencyDataLag is nil then it will be populated from latencyData.
Looks for the given string in the output of fn, repeatedly calling fn until the timeout is reached or the string is found.
Looks for the given string in a file in a specific pod container.
Looks for the given string in the log of a specific pod container.
Looks for the given string in the output of a command executed in a specific pod container.
MakeFirewallNameForLBService return the expected firewall name for a LB service.
No description provided by the author
MigTemplate (GCE-only) returns the name of the MIG template that the nodes of the cluster use.
NewNetworkingTestNodeE2EConfig creates and sets up a new test config helper for Node E2E.
NewFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewHostExecPodSpec returns the pod spec of hostexec pod.
No description provided by the author
NewLogsVerifier creates a new LogsSizeVerifier which will stop when stopChannel is closed.
NewNetworkingTestConfig creates and sets up a new test config helper.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewServiceTestJig allocates and inits a new ServiceTestJig.
NewStatefulSet creates a new NGINX StatefulSet for testing.
NewStatefulSetPVC returns a PersistentVolumeClaim named name, for testing StatefulSets.
NewStatefulSetTester creates a StatefulSetTester that uses c to interact with the API server.
NodeAddresses returns the first address of the given type of each node.
No description provided by the author
NodeProxyRequest performs a get on a node proxy endpoint given the nodename and rest client.
NodeSSHHosts returns SSH-able host names for all schedulable nodes - this excludes master node.
No description provided by the author
OpenWebSocketForURL constructs a websocket connection to the provided URL, using the client config, with the specified protocols.
PackProtocolsPortsFromFirewall packs protocols and ports in an unified way for verification.
ParseKVLines parses output that looks like lines containing "<key>: <val>" and returns <val> if <key> is found.
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
PollURL polls till the url responds with a healthy http code.
No description provided by the author
No description provided by the author
No description provided by the author
PrintPerfData prints the perfdata in json format with PerfResultTag prefix.
No description provided by the author
RcByNameContainer returns a ReplicationControoler with specified name and container.
RcByNamePort returns a ReplicationController with specified name and port.
Register flags specific to the cluster e2e test suite.
Register flags common to all e2e test suites.
Register flags specific to the node e2e test suite.
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.
No description provided by the author
Resets latency metrics in apiserver.
ResourceUsageToPerfData transforms ResourceUsagePerNode to PerfData.
ResourceUsageToPerfDataWithLabels transforms ResourceUsagePerNode to PerfData with additional labels.
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
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.
RunKubectl is a convenience wrapper over kubectlBuilder.
RunKubectlOrDie is a convenience wrapper over kubectlBuilder.
RunKubectlOrDieInput is a convenience wrapper over kubectlBuilder that takes input to stdin.
No description provided by the author
No description provided by the author
SameStringArray verifies whether two string arrays have the same strings, return error if not.
No description provided by the author
No description provided by the author
ScaleRCByLabels scales an RC via ns/label lookup.
No description provided by the author
ServerVersionGTE returns true if v is greater than or equal to the server version.
No description provided by the author
SetInstanceTags sets tags on GCE instance with given name.
SetStatefulSetInitializedAnnotation sets teh StatefulSetInitAnnotation to value.
SimpleGET executes a get on the given url, returns error if non-200 returned.
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
No description provided by the author
No description provided by the author
No description provided by the author
SSH synchronously SSHs to a node running on provider and runs cmd.
No description provided by the author
StartServeHostnameService creates a replication controller that serves its hostname and a service on top of it.
StatefulSetFromManifest returns a StatefulSet from a manifest stored in fileName in the Namespace indicated by ns.
No description provided by the author
A list of containers for which we want to collect resource usage.
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
No description provided by the author
Rough equivalent of ctrl+c for cleaning up processes.
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
UpdateService fetches a service, calls the update function on it, and then attempts to send the updated service.
No description provided by the author
ValidateController is a generic mechanism for testing RC's that are running.
No description provided by the author
VerifyFirewallRule verifies whether the result firewall is consistent with the expected firewall.
No description provided by the author
No description provided by the author
Verifies whether 50, 90 and 99th percentiles of PodStartupLatency are within the threshold.
Verifies (currently just by logging them) the scheduling latencies.
No description provided by the author
VerifyServeHostnameServiceUp wgets the given serviceIP:servicePort from the given host and from within a pod.
No description provided by the author
ViperizeFlags sets up all flag and config processing.
checks whether all registered nodes are ready and all required Pods are running on them.
No description provided by the author
No description provided by the author
WaitForAuthorizationUpdate checks if the given user can perform the named verb and action.
WaitForClusterSize waits until the cluster has desired size and there is no not-ready nodes in it.
Wait up to 10 minutes for pods to become Running.
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.
Waits for the deployment to clean up old rcs.
WaitForDeploymentRevisionAndImage waits for the deployment's and its new RS's revision and container image to match the given revision and image.
WaitForDeploymentRollbackCleared waits for given deployment either started rolling back or doesn't need to rollback.
Waits for the deployment to reach desired state.
Waits for the deployment status to become valid (i.e.
WaitForDeploymentUpdatedReplicasLTE waits for given deployment to be observed by the controller and has at least a number of updatedReplicas.
No description provided by the author
No description provided by the author
Waits for the number of events on the given object to reach a desired count.
WaitForIngressAddress waits for the Ingress to acquire an address.
waitForMasters waits until the cluster has the desired number of ready masters in it.
WaitForMatchPodsCondition finds match pods based on the input ListOptions.
No description provided by the author
WaitForNodeToBe returns whether node "name's" condition state matches wantTrue within timeout.
WaitForNodeToBeNotReady returns whether node name is not ready (i.e.
WaitForNodeToBeReady returns whether node name is ready within timeout.
No description provided by the author
No description provided by the author
Waits for the number of events on the given object to be at least a desired count.
WaitForPersistentVolumeClaimPhase waits for a PersistentVolumeClaim to be in a specific phase or until timeout occurs, whichever comes first.
WaitForPersistentVolumeDeleted waits for a PersistentVolume to get deleted or until timeout occurs, whichever comes first.
WaitForPersistentVolumePhase waits for a PersistentVolume to be in a specific phase or until timeout occurs, whichever comes first.
No description provided by the author
Waits default amount of time (PodStartTimeout) for the specified pod to become running.
Waits default amount of time (podNoLongerRunningTimeout) for the specified pod to stop running.
WaitForPodNotPending returns an error if it took too long for the pod to go out of pending state.
Waits default amount of time (PodStartTimeout) for the specified pod to become running.
No description provided by the author
WaitForPodsRunningReady waits up to timeout to ensure that all pods in namespace ns are either running and ready, or failed but controlled by a controller.
WaitForPodsSuccess waits till all labels matching the given selector enter the Success state.
WaitForPodSuccessInNamespace returns nil if the pod reached state success, or an error if it reached failure or until podStartupTimeout.
WaitForPodSuccessInNamespaceSlow returns nil if the pod reached state success, or an error if it reached failure or until slowPodStartupTimeout.
Wait up to PodListTimeout for getting pods with certain label.
Wait for exact amount of matching pods to become running and ready.
Wait for all matching pods to become scheduled and at least one matching pod exists.
No description provided by the author
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.
WaitForReadyReplicaSet waits until the replica set has all of its replicas ready.
WaitForReplicationController waits until the RC 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.
WaitForStableCluster waits until all existing pods are scheduled and returns their amount.
No description provided by the author
WatchRecreateDeployment watches Recreate deployments and ensures no new pods will run at the same time with old pods.

# Constants

How long claims have to become dynamically provisioned.
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
Set ports outside of 30000-32767, 80 and 8080 to avoid being whitelisted by the e2e cluster.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
KubeProxyLagTimeout is the maximum time a kube-proxy daemon on a node is allowed to not notice a Service update, such as type=NodePort.
No description provided by the author
Time required by the loadbalancer to cleanup, proportional to numApps/Ing.
How long to wait for a load balancer to be created/modified.TODO: once support ticket 21807001 is resolved, reduce this timeout back to something reasonable.
No description provided by the author
LoadBalancerLagTimeoutAWS is the delay between ELB creation and serving traffic on AWS.
LoadBalancerLagTimeoutDefault is the maximum time a load balancer is allowed to not respond after creation.
No description provided by the author
On average it takes ~6 minutes for a single backend to come online in GCE.
Don't test with more than 3 nodes.
If there are any orphaned namespaces to clean up, this test is running on a long lived cluster.
No description provided by the author
How long nodes have to be "ready" when a test begins.
NodeStartupThreshold is a rough estimate of the time allocated for a pod to start on a node.
How long to wait for the pod to be listable.
How long pods have to be "ready" when a test begins.
Initial pod start can be delayed O(minutes) by slow docker pulls TODO: Make this 30 seconds once #4566 is resolved.
How often to Poll pods, nodes and claims.
How long a node is allowed to become "Ready" after it is restarted before the test is considered failed.
How long each node is given during a process that restarts all nodes before the test is considered failed.
How long a pod is allowed to become "running" and "ready" after a node restart before test is considered failed.
How often to Poll the statues of a restart.
service accounts are provisioned after namespace creation a service account is required to support pod creation in a namespace as part of admission control.
No description provided by the author
How long to wait for a service endpoint to be resolvable.
ServiceTestTimeout is used for most polling/waiting activities.
How long to try single API calls (like 'get' or 'list').
Timeout for stateful pods to change state.
Poll interval for StatefulSet tests.
Timeout interval for StatefulSet operations.
No description provided by the author

# Variables

Label allocated to the image puller static pod that runs on each node before e2es.
ImageWhiteList is the images used in the current test suite.
No description provided by the author
No description provided by the author
No description provided by the author
ProvidersWithSSH are those providers where each node is accessible with SSH.
unique identifier of the e2e run.
This should match whatever the default/configured range is.
SubResource proxy should have been functional in v1.0.0, but SubResource proxy via tunneling is known to be broken in v1.0.
No description provided by the author
No description provided by the author

# Structs

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
E2ETestNodePreparer implements testutils.TestNodePreparer interface, which is used to create/modify Nodes before running a test.
ExecOptions passed to ExecWithOptions.
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you.
No description provided by the author
No description provided by the author
No description provided by the author
KubeletMetric stores metrics scraped from the kubelet server's /metric endpoint.
No description provided by the author
No description provided by the author
Dashboard metrics.
LogSizeGatherer is a worker which grabs a WorkItem from the channel and does assigned work.
No description provided by the author
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.
NodeTestContextType is part of TestContextType, it is shared by all node e2e test.
No description provided by the author
PodLatencyData encapsulates pod startup latency information.
No description provided by the author
PodStateVerification represents a verification of pod state.
No description provided by the author
No description provided by the author
ResourceMonitor manages a resourceCollector per node.
RuntimeOperationErrorRate is the error rate of a specified runtime operation.
RuntimeOperationMonitor is the tool getting and parsing docker operation metrics.
No description provided by the author
No description provided by the author
Simple helper class to avoid too much boilerplate in tests.
A test jig to help service testing.
No description provided by the author
No description provided by the author
No description provided by the author
StatefulSetTester is a struct that contains utility methods for testing StatefulSet related functionality.
No description provided by the author
TimestampedSize contains a size together with a time of measurement.
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

No description provided by the author

# Type aliases

No description provided by the author
ContainersCPUSummary is indexed by the container name with each entry a (percentile, value) map.
No description provided by the author
No description provided by the author
No description provided by the author
KubeletMetricByLatency implements sort.Interface for []KubeletMetric based on the latency field.
No description provided by the author
No description provided by the author
node -> file -> data.
No description provided by the author
NodeRuntimeOperationErrorRate is the runtime operation error rate on one node.
NodesCPUSummary is indexed by the node name with each entry a ContainersCPUSummary map.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
we can't have int here, as JSON does not accept integer keys.
VerifyStatefulPodFunc is a func that examines a StatefulSetPod.