Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SuiteStartClusterOpts = StartClusterOpts{}
SuiteStartClusterOpts are start cluster options that are used within the KubeSuite.
View Source
var SuiteStopClusterOpts = StopClusterOpts{}
SuiteStopClusterOpts are stop cluster options that are used within the KubeSuite.
Functions ¶
func StopCluster ¶
func StopCluster(cluster *TestClusterConfig, _ StopClusterOpts) error
Types ¶
type KubeSuite ¶
type KubeSuite struct {
suite.Suite
ClusterConfig *TestClusterConfig
}
KubeSuite a Testify Suite that creates a cluster and contains the config for that cluster. It is up to the user of this library to initialize the cluster
For example:
func (*KubeSuite) SetupSuite ¶
func (k *KubeSuite) SetupSuite()
func (*KubeSuite) TearDownSuite ¶
func (k *KubeSuite) TearDownSuite()
type StartClusterOpts ¶
type StartClusterOpts struct {
// If not set, defaults to the latest K3s version. You can find K3s tags at https://hub.docker.com/r/rancher/k3s/tags.
K3sImageTag string
// Creation options that are merged into the default. If not specified, a small K3s server with a single server and no agents is started.
K3dCreateClusterOpts *v1alpha2.SimpleConfig
Silent bool
}
StartClusterOpts options to start the cluster.
type StopClusterOpts ¶
type StopClusterOpts struct {
}
type TestClusterConfig ¶
type TestClusterConfig struct {
KubeConfig *api.Config
RestConfig *rest.Config
K3dCluster *k3d.Cluster
Name string
}
func StartCluster ¶
func StartCluster(opts StartClusterOpts) (*TestClusterConfig, error)
StartCluster creates a small and ephemeral K3s cluster for testing purposes.
Click to show internal directories.
Click to hide internal directories.