testcluster

command
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

README

testcluster helper tool

This package contains a helper tool that is used in the Landscaper integration tests and local development to create and delete test clusters and test registries.

The testcluster tool consists of 2 subcommands: cluster and registry and each one is also exposed for the testmachinery as their own TestDefinition. See the definition in .test-defs.

Cluster

The cluster subcommand can create and delete kubernetes clusters (backed by k3d) in a kubernetes cluster.

$ testcluster cluster create --kubeconfig HOST_KUBECONFIG --id [UNIQUE_ID]
$ testcluster cluster delete --kubeconfig HOST_KUBECONFIG --id [UNIQUE_ID]

The cluster is scheduled as a pod in a kubernetes cluster and is only reachable within the k8s cluster with the pod ip. Corresponding kubeconfig can be exported to a file using the --export PATH flag.

Registry

The registry subcommand can create and delete oci registries (backed by registry/registry) in a kubernetes cluster.

$ testcluster registry create --kubeconfig HOST_KUBECONFIG --id [UNIQUE_ID]
$ testcluster registry delete --kubeconfig HOST_KUBECONFIG --id [UNIQUE_ID]

The registry is scheduled as a pod in a kubernetes cluster and is only reachable within the k8s cluster with the service name. The registry serves a https endpoint with a self-signed certificate that has included the service name (<service-name>.<service-namespace>and <service-name>.<service-namespace>).

Note: The certificates root CA is exported into the same directory as the credentials. During integration test cluster setup, the exported file is used to create a secret which is then mounted into the certificate directory (/etc/ssl) of the landscaper containers.

Corresponding docker auth file can be exported to a file using the --registry-auth PATH flag.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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