Documentation
¶
Index ¶
- Constants
- Variables
- func BadEvents(events []*api.Event) int
- func CheckCadvisorHealthOnAllNodes(c *client.Client, timeout time.Duration)
- func ClusterLevelLoggingWithElasticsearch(f *Framework)
- func DeleteRC(c *client.Client, ns, name string) error
- func FailedContainers(pod *api.Pod) map[string]ContainerFailures
- func Failf(format string, a ...interface{})
- func GetKubeletPods(c *client.Client, node string) (*api.PodList, error)
- func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error)
- func LaunchNetTestPodPerNode(f *Framework, nodes *api.NodeList, name, version string) []string
- func Logf(format string, a ...interface{})
- func NodeSSHHosts(c *client.Client) ([]string, error)
- func RunRC(config RCConfig) error
- func SSH(cmd, host, provider string) (string, string, int, error)
- func ScaleRC(c *client.Client, ns, name string, size uint) error
- func ServeImageOrFail(c *client.Client, test string, image string)
- func SkipIfProviderIs(unsupportedProviders ...string)
- func SkipUnlessNodeCountIsAtLeast(minNodeCount int)
- func SkipUnlessProviderIs(supportedProviders ...string)
- func Skipf(format string, args ...interface{})
- type CloudConfig
- type ContainerFailures
- type Framework
- type KubeletMetric
- type KubeletMetricByLatency
- type LatencyMetric
- type LatencyMetricByLatency
- type PodDiff
- type RCConfig
- type State
- type TestContextType
- type VolumeTestConfig
- type WebserverTest
- func (t *WebserverTest) BuildServiceSpec() *api.Service
- func (t *WebserverTest) Cleanup() []error
- func (t *WebserverTest) CreateService(service *api.Service) (*api.Service, error)
- func (t *WebserverTest) CreateWebserverRC(replicas int) *api.ReplicationController
- func (t *WebserverTest) DeleteService(serviceName string) error
Constants ¶
const NodeStartupThreshold = 4 * time.Second
NodeStartupThreshold is a rough estimate of the time allocated for a pod to start on a node.
Variables ¶
var MaxContainerFailures = 0
Maximum container failures this test tolerates before failing.
var ServiceNodePortRange = util.PortRange{Base: 30000, Size: 2767}
This should match whatever the default/configured range is
Functions ¶
func BadEvents ¶ added in v0.17.1
Prints the histogram of the events and returns the number of bad events.
func CheckCadvisorHealthOnAllNodes ¶ added in v0.12.0
func ClusterLevelLoggingWithElasticsearch ¶ added in v0.14.1
func ClusterLevelLoggingWithElasticsearch(f *Framework)
ClusterLevelLoggingWithElasticsearch is an end to end test for cluster level logging.
func FailedContainers ¶ added in v0.18.0
func FailedContainers(pod *api.Pod) map[string]ContainerFailures
FailedContainers inspects all containers in a pod and returns failure information for containers that have failed or been restarted. A map is returned where the key is the containerID and the value is a struct containing the restart and failure information
func GetKubeletPods ¶ added in v0.21.0
GetKubeletPods retrieves the list of running pods on the kubelet. The pods includes necessary information (e.g., UID, name, namespace for pods/containers), but do not contain the full spec.
func HighLatencyRequests ¶ added in v0.17.1
func HighLatencyRequests(c *client.Client, threshold time.Duration, ignoredResources util.StringSet) (int, error)
Prints summary metrics for request types with latency above threshold and returns number of such request types.
func LaunchNetTestPodPerNode ¶ added in v0.15.0
func NodeSSHHosts ¶ added in v0.18.0
NodeSSHHosts returns SSH-able host names for all nodes. It returns an error if it can't find an external IP for every node, though it still returns all hosts that it found in that case.
func RunRC ¶ added in v0.13.1
RunRC Launches (and verifies correctness) of a Replication Controller and will wait for all pods it spawns to become "Running". It's the caller's responsibility to clean up externally (i.e. use the namespace lifecycle for handling cleanup).
func SSH ¶ added in v0.17.1
SSH synchronously SSHs to a node running on provider and runs cmd. If there is no error performing the SSH, the stdout, stderr, and exit code are returned.
func ServeImageOrFail ¶ added in v0.12.0
A basic test to check the deployment of an image using a replication controller. The image serves its hostname which is checked for each replica.
func SkipIfProviderIs ¶ added in v0.21.0
func SkipIfProviderIs(unsupportedProviders ...string)
func SkipUnlessNodeCountIsAtLeast ¶ added in v0.21.0
func SkipUnlessNodeCountIsAtLeast(minNodeCount int)
func SkipUnlessProviderIs ¶ added in v0.21.0
func SkipUnlessProviderIs(supportedProviders ...string)
Types ¶
type CloudConfig ¶ added in v0.15.0
type ContainerFailures ¶ added in v0.18.0
type ContainerFailures struct {
// contains filtered or unexported fields
}
type Framework ¶ added in v0.18.0
Framework supports common operations used by e2e tests; it will keep a client & a namespace for you. Eventual goal is to merge this with integration test framework.
func NewFramework ¶ added in v0.18.0
NewFramework makes a new framework and sets up a BeforeEach/AfterEach for you (you can write additional before/after each functions).
func (*Framework) TestContainerOutput ¶ added in v0.18.0
func (f *Framework) TestContainerOutput(scenarioName string, pod *api.Pod, containerIndex int, expectedOutput []string)
Runs the given pod and verifies that the output of exact container matches the desired output.
func (*Framework) WaitForAnEndpoint ¶ added in v0.20.0
WaitForAnEndpoint waits for at least one endpoint to become available in the service's corresponding endpoints object.
func (*Framework) WaitForPodRunning ¶ added in v0.18.0
WaitForPodRunning waits for the pod to run in the namespace.
type KubeletMetric ¶ added in v0.20.0
type KubeletMetric struct { // eg: list, info, create Operation string // eg: sync_pods, pod_worker Method string // 0 <= quantile <=1, e.g. 0.95 is 95%tile, 0.5 is median. Quantile float64 Latency time.Duration }
KubeletMetric stores metrics scraped from the kubelet server's /metric endpoint. TODO: Get some more structure aroud the metrics and this type
func HighLatencyKubeletOperations ¶ added in v0.20.0
func HighLatencyKubeletOperations(c *client.Client, threshold time.Duration, nodeName string) ([]KubeletMetric, error)
HighLatencyKubeletOperations logs and counts the high latency metrics exported by the kubelet server via /metrics.
func ParseKubeletMetrics ¶ added in v0.21.0
func ParseKubeletMetrics(metricsBlob string) ([]KubeletMetric, error)
ReadKubeletMetrics reads metrics from the kubelet server running on the given node
type KubeletMetricByLatency ¶ added in v0.20.0
type KubeletMetricByLatency []KubeletMetric
KubeletMetricByLatency implements sort.Interface for []KubeletMetric based on the latency field.
func (KubeletMetricByLatency) Len ¶ added in v0.20.0
func (a KubeletMetricByLatency) Len() int
func (KubeletMetricByLatency) Less ¶ added in v0.20.0
func (a KubeletMetricByLatency) Less(i, j int) bool
func (KubeletMetricByLatency) Swap ¶ added in v0.20.0
func (a KubeletMetricByLatency) Swap(i, j int)
type LatencyMetric ¶ added in v0.17.1
type LatencyMetric struct { Verb string Resource string // 0 <= quantile <=1, e.g. 0.95 is 95%tile, 0.5 is median. Quantile float64 Latency time.Duration }
LatencyMetrics stores data about request latency at a given quantile broken down by verb (e.g. GET, PUT, LIST) and resource (e.g. pods, services).
func ReadLatencyMetrics ¶ added in v0.17.1
func ReadLatencyMetrics(c *client.Client) ([]LatencyMetric, error)
type LatencyMetricByLatency ¶ added in v0.18.0
type LatencyMetricByLatency []LatencyMetric
LatencyMetricByLatency implements sort.Interface for []LatencyMetric based on the latency field.
func (LatencyMetricByLatency) Len ¶ added in v0.18.0
func (a LatencyMetricByLatency) Len() int
func (LatencyMetricByLatency) Less ¶ added in v0.18.0
func (a LatencyMetricByLatency) Less(i, j int) bool
func (LatencyMetricByLatency) Swap ¶ added in v0.18.0
func (a LatencyMetricByLatency) Swap(i, j int)
type PodDiff ¶ added in v0.18.0
type PodDiff map[string]*podInfo
PodDiff is a map of pod name to podInfos
type RCConfig ¶ added in v0.19.0
type RCConfig struct { Client *client.Client Image string Name string Namespace string PollInterval time.Duration Timeout time.Duration PodStatusFile *os.File Replicas int // Env vars, set the same for every pod. Env map[string]string // Extra labels added to every pod. Labels map[string]string // Ports to declare in the container (map of name to containerPort). Ports map[string]int // Pointer to a list of pods; if non-nil, will be set to a list of pods // created by this RC by RunRC. CreatedPods *[]*api.Pod // Maximum allowable container failures. If exceeded, RunRC returns an error. // Defaults to replicas*0.1 if unspecified. MaxContainerFailures *int }
type TestContextType ¶ added in v0.15.0
type VolumeTestConfig ¶ added in v0.18.0
type VolumeTestConfig struct {
// contains filtered or unexported fields
}
Configuration of one tests. The test consist of: - server pod - runs serverImage, exports ports[] - client pod - does not need any special configuration
type WebserverTest ¶ added in v0.18.0
type WebserverTest struct { ServiceName string Namespace string Client *client.Client TestId string Labels map[string]string // contains filtered or unexported fields }
Simple helper class to avoid too much boilerplate in tests
func NewWebserverTest ¶ added in v0.18.0
func NewWebserverTest(client *client.Client, namespace string, serviceName string) *WebserverTest
func (*WebserverTest) BuildServiceSpec ¶ added in v0.18.0
func (t *WebserverTest) BuildServiceSpec() *api.Service
Build default config for a service (which can then be changed)
func (*WebserverTest) Cleanup ¶ added in v0.18.0
func (t *WebserverTest) Cleanup() []error
func (*WebserverTest) CreateService ¶ added in v0.18.0
Create a service, and record it for cleanup
func (*WebserverTest) CreateWebserverRC ¶ added in v0.20.0
func (t *WebserverTest) CreateWebserverRC(replicas int) *api.ReplicationController
CreateWebserverRC creates rc-backed pods with the well-known webserver configuration and records it for cleanup.
func (*WebserverTest) DeleteService ¶ added in v0.18.0
func (t *WebserverTest) DeleteService(serviceName string) error
Delete a service, and remove it from the cleanup list
Source Files
¶
- addon_update.go
- cadvisor.go
- certs.go
- cluster_upgrade.go
- container_probe.go
- core.go
- density.go
- dns.go
- docker_containers.go
- downward_api.go
- empty_dir.go
- es_cluster_logging.go
- etcd_failure.go
- events.go
- examples.go
- expansion.go
- framework.go
- host_path.go
- kubectl.go
- kubelet.go
- kubelet_stats.go
- load.go
- max_pods.go
- monitoring.go
- namespace.go
- networking.go
- pd.go
- persistent_volumes.go
- pods.go
- pre_stop.go
- proxy.go
- rc.go
- reboot.go
- resize_nodes.go
- restart.go
- scale.go
- secrets.go
- service.go
- service_accounts.go
- service_latency.go
- shell.go
- ssh.go
- util.go
- volumes.go