Documentation ¶
Index ¶
- Constants
- func CreateCluster(ctx context.Context, logger utils.Logger, args CreateClusterArgs) (err error)
- func CreateHtpasswd(username, password string) string
- func CreateRegistry(ctx context.Context, logger utils.Logger, kubeClient client.Client, ...) (err error)
- func DeleteCluster(ctx context.Context, logger utils.Logger, kubeClient client.Client, ...) error
- func DeleteRegistry(ctx context.Context, logger utils.Logger, kubeClient client.Client, ...) error
- func RandString(n int) string
- type CreateClusterArgs
- type ShootClusterManager
- type State
Constants ¶
const ( ComponentCluster = "cluster" ComponentRegistry = "registry" )
const ( DNSFormatInternal = "internal" DNSFormatExternal = "external" )
const ClusterIdLabelName = "cluster.test.landscaper.gardener.cloud/id"
ClusterIdLabelName is the name of the label that holds the unique id for the current created cluster. It is used by the delete command to find the created cluster.
const ComponentLabelName = "cluster.test.landscaper.gardener.cloud/component"
ComponentLabelName is the name of the label that specifies the component that is deployed
const DefaultK8sVersion = "v1.20.8"
DefaultK8sVersion defines the default k3s version. The real version is appended with a "-k3s1"
const K3sImageRepository = "docker.io/rancher/k3s"
K3sImageRepository is the repository name of the k3s images.
Variables ¶
This section is empty.
Functions ¶
func CreateCluster ¶
CreateCluster creates a new k3d cluster running in a pod.
func CreateHtpasswd ¶
CreateHtpasswd creates a htpasswd string for a username and password
func CreateRegistry ¶
func DeleteCluster ¶
func DeleteCluster(ctx context.Context, logger utils.Logger, kubeClient client.Client, namespace string, id string, timeout time.Duration) error
DeleteCluster deletes a previously deployed test cluster.
func DeleteRegistry ¶
func DeleteRegistry(ctx context.Context, logger utils.Logger, kubeClient client.Client, namespace string, id string, timeout time.Duration) error
DeleteRegistry deletes a previously created registry.
func RandString ¶
RandString creates a random string with n characters.
Types ¶
type CreateClusterArgs ¶
type CreateClusterArgs struct { KubeClient client.Client RestConfig *rest.Config Namespace string ID string StateFile string ExportKubeconfigPath string Timeout time.Duration KubernetesVersion string }
CreateClusterArgs defines the arguments to create a cluster.
type ShootClusterManager ¶
type ShootClusterManager struct {
// contains filtered or unexported fields
}
func NewShootClusterManager ¶
func (*ShootClusterManager) CreateShootCluster ¶
func (o *ShootClusterManager) CreateShootCluster(ctx context.Context) error
func (*ShootClusterManager) DeleteShootCluster ¶
func (o *ShootClusterManager) DeleteShootCluster(ctx context.Context) error