Documentation ¶
Index ¶
- Variables
- func DockerRegistry(ctx context.Context) string
- func GetKubeconfig(ctx context.Context) string
- func K3sDown(ctx context.Context) string
- func K3sUp(ctx context.Context, k3sExtraFlags ...string) string
- func K3sVersionUp(ctx context.Context, kubeVersion KubeVersion, k3sExtraFlags ...string) string
- func KubeVersionConfig(ctx context.Context, kubeVersion KubeVersion, k3sExtraFlags ...string) string
- func Kubeconfig(ctx context.Context, k3sExtraFlags ...string) string
- func RegistryDown(ctx context.Context) string
- func RegistryUp(ctx context.Context) string
- func WithMachineLock(ctx context.Context, body func(context.Context))
- func WithNamedMachineLock(ctx context.Context, name string, body func(context.Context))
- type KubeVersion
Constants ¶
This section is empty.
Variables ¶
var ( Kube20 = KubeVersion{20} Kube21 = KubeVersion{21} Kube22 = KubeVersion{22} KubeLatest = Kube22 )
Functions ¶
func DockerRegistry ¶
DockerRegistry returns a docker registry suitable for use in tests.
func GetKubeconfig ¶
GetKubeconfig returns the kubeconfig contents for the running k3s cluster as a string. It will return the empty string if no cluster is running.
func K3sUp ¶
K3sUp will launch if necessary and return the docker id of a container running a k3s cluster.
func K3sVersionUp ¶
func K3sVersionUp(ctx context.Context, kubeVersion KubeVersion, k3sExtraFlags ...string) string
func KubeVersionConfig ¶
func KubeVersionConfig(ctx context.Context, kubeVersion KubeVersion, k3sExtraFlags ...string) string
func Kubeconfig ¶
Kubeconfig returns a path referencing a kubeconfig file suitable for use in tests.
func RegistryDown ¶
RegistryDown shutsdown the test registry.
func RegistryUp ¶
RegistryUp will launch if necessary and return the docker id of a container running a docker registry.
func WithMachineLock ¶
WithMachineLock executes the supplied body with a guarantee that it is the only code running (via WithMachineLock) on the machine.
func WithNamedMachineLock ¶
WithNamedMachineLock executes the supplied body with a guarantee that it is the only code running (via WithMachineLock) on the machine. The name provides scope so this can be used in multiple independent ways without conflicts.
Types ¶
type KubeVersion ¶
type KubeVersion struct {
// contains filtered or unexported fields
}