Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Masters []platform.Machine Workers []platform.Machine Info Info *harness.H // contains filtered or unexported fields }
Cluster represents an interface to test kubernetes clusters. The harness object is used for logging, exiting or skipping a test. Is nearly identical to the Go test harness. The creation is usually implemented by a function that builds the Cluster from a kola TestCluster from the 'spawn' subpackage. Tests may be aware of the implementor function since not all clusters are expected to have the same components nor properties.
func NewCluster ¶
func (*Cluster) AddMasters ¶
AddMasters creates new master nodes for a Cluster and blocks until ready.
func (*Cluster) Ready ¶
Ready blocks until a Cluster is considered available. The current implementation only checks that all nodes are Registered. TODO: Use the manager interface to allow the implementor to determine when a Cluster is considered available either by exposing enough information for this function to check that certain pods are running or implementing its own `Ready() error` function that gets called to after the nodeCheck in this function.
func (*Cluster) SSH ¶
SSH is just a convenience function for running SSH commands when you don't care which machine the command runs on. The current implementation chooses the first master node. The signature is slightly different then the machine SSH command and doesn't automatically print stderr. I expect in the future that this will be more unified with the Machine.SSH signature, but for now this is useful to silence all the retry loops from clogging up the test results while giving the option to deal with stderr.
type Info ¶ added in v0.4.0
type Info struct { KubeletTag string // e.g. v1.5.3_coreos.0 Version string // e.g. v1.5.3+coreos.0 ImageRepo string // e.g. quay.io/coreos/hyperkube }
Info contains information about how a Cluster is configured that may be useful for some tests.
type Manager ¶
type Manager interface { AddMasters(n int) ([]platform.Machine, error) AddWorkers(n int) ([]platform.Machine, error) }
A Manager provides higher level management of the underlying Cluster platform.
type Options ¶ added in v0.4.0
Options represent per-test options that control the initial creation of a Cluster. It is advised that all options are explicitly filled out for each registered test. TODO(pb): If this is too verbose to declare per test we may move to a default system but lose the nice struct declaration syntax. Eventually, we may allow overriding global options such as bootkube versions or cloud options.