Documentation
¶
Index ¶
- func CreateKindCluster(clusterName string) env.Func
- func CreateKindClusterWithConfig(clusterName, image, configFilePath string) env.Func
- func CreateNamespace(name string) env.Func
- func DeleteNamespace(name string) env.Func
- func DestroyKindCluster(name string) env.Func
- func LoadDockerImageToCluster(name, image string) env.Func
- func LoadImageArchiveToCluster(name, imageArchive string) env.Func
- func SetupCRDs(crdPath, pattern string) env.Func
- func TeardownCRDs(crdPath, pattern string) env.Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKindCluster ¶
CreateKindCluster returns an env.Func that is used to create a kind cluster that is then injected in the context using the name as a key.
NOTE: the returned function will update its env config with the kubeconfig file for the config client.
func CreateKindClusterWithConfig ¶ added in v0.0.4
CreateKindClusterWithConfig returns an env.Func that is used to create a kind cluster that is then injected in the context using the name as a key.
NOTE: the returned function will update its env config with the kubeconfig file for the config client.
func CreateNamespace ¶
CreateNamespace provides an Environment.Func that creates a new namespace API object and stores it the context using its name as key.
NOTE: the returned environment function automatically updates the env config, it receives, with the namespace to make it available for subsequent call.
func DeleteNamespace ¶
DeleteNamespace provides an Environment.Func that deletes the named namespace. It first searches for the ns in its context, if not found then attempt to retrieve it from the API server. Then deletes it.
func DestroyKindCluster ¶
DestroyKindCluster returns an EnvFunc that retrieves a previously saved kind Cluster in the context (using the name), then deletes it.
NOTE: this should be used in a Environment.Finish step.
func LoadDockerImageToCluster ¶ added in v0.0.5
LoadDockerImageToCluster returns an EnvFunc that retrieves a previously saved kind Cluster in the context (using the name), and then loads a docker image from the host into the cluster.
func LoadImageArchiveToCluster ¶ added in v0.0.5
LoadImageArchiveToCluster returns an EnvFunc that retrieves a previously saved kind Cluster in the context (using the name), and then loads a docker image TAR archive from the host into the cluster.
func SetupCRDs ¶ added in v0.0.7
SetupCRDs is provided as a helper env.Func handler that can be used to setup the CRDs that are required to process your controller code for testing. For additional control on resource creation handling, please use the decoder.ApplyWithManifestDir directly with suitable arguments to customize the behavior
func TeardownCRDs ¶ added in v0.0.7
TeardownCRDs is provided as a handler function that can be hooked into your test's teardown sequence to make sure that you can cleanup the CRDs that were setup as part of the SetupCRDs hook
Types ¶
This section is empty.