k3d

package
v0.0.0-...-2bcb20d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigurationFileKey = "k3d"

The json/yaml config key for the k3d config

Variables

This section is empty.

Functions

func CreateAndImportK3DCluster

func CreateAndImportK3DCluster(client *rancher.Client, name, image, hostname string, servers, agents int, importImage bool) (*apisV1.Cluster, error)

CreateAndImportK3DCluster creates a new k3d cluster and imports it into rancher.

func CreateK3DCluster

func CreateK3DCluster(ts *session.Session, name, hostname string, servers, agents int) (*rest.Config, error)

CreateK3DCluster creates a minimal k3d cluster and returns a rest config for connecting to the newly created cluster. If a name is not given a random one will be generated.

func DeleteK3DCluster

func DeleteK3DCluster(name string) error

DeleteK3DCluster deletes the k3d cluster with the given name. An error is returned if the cluster does not exist.

func ImportImage

func ImportImage(image, clusterName string) error

ImportImage imports an image from docker into the specified k3d cluster. Meant to use local docker images without having to setup a registry.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is configuration needed to create k3d cluster for integration testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL