Documentation
¶
Index ¶
- Constants
- func GateAddress() string
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func InstallCertManager() error
- func InstallPrometheusOperator() error
- func IsCertManagerCRDsInstalled() bool
- func IsPrometheusCRDsInstalled() bool
- func KindCluster() string
- func LoadImageToKindClusterWithName(name string) error
- func MiseRun(env []string, task string, args ...string) (string, error)
- func PublishToKindRegistry(image, repo string) (string, error)
- func RemoveKindRegistry()
- func Run(cmd *exec.Cmd) (string, error)
- func UncommentCode(filename, target, prefix string) error
- func UninstallCertManager()
- func UninstallPrometheusOperator()
Constants ¶
const ( // KindRegistryHost is the name of the upstream registry of the kind tests, as the cluster sees it: a plain HTTP registry in a container on the docker // network of kind, standing in for the registry the platform images come from (docker.io, ghcr.io). It has a dot, so it reads as a registry host. // hack/kind/e2e-values.yaml names it in the cache registries and in the repositories of the VPN and gateway image. KindRegistryHost = "registry.e2e.test" )
Variables ¶
This section is empty.
Functions ¶
func GateAddress ¶ added in v1.10.0
func GateAddress() string
GateAddress is where the lab nodes dial the registry gate on the kind cluster: a node port of the control-plane node (where the lab-control pool runs), by the name of its container on the docker network of kind. It follows the cluster's name, so a cluster of another name works.
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is
func InstallCertManager ¶
func InstallCertManager() error
InstallCertManager installs the cert manager bundle.
func InstallPrometheusOperator ¶
func InstallPrometheusOperator() error
InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.
func IsCertManagerCRDsInstalled ¶
func IsCertManagerCRDsInstalled() bool
IsCertManagerCRDsInstalled checks if any Cert Manager CRDs are installed by verifying the existence of key CRDs related to Cert Manager.
func IsPrometheusCRDsInstalled ¶
func IsPrometheusCRDsInstalled() bool
IsPrometheusCRDsInstalled checks if any Prometheus CRDs are installed by verifying the existence of key CRDs related to Prometheus.
func KindCluster ¶ added in v1.10.0
func KindCluster() string
KindCluster is the name of the kind cluster of the tests (KIND_CLUSTER, default "kind").
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster
func MiseRun ¶ added in v1.10.0
MiseRun runs a mise task of the repository with extra environment variables (NAME=value), such as the image names of the image:build task.
func PublishToKindRegistry ¶ added in v1.10.0
PublishToKindRegistry pushes a docker image (pulled first when it is not local) to the upstream registry of the kind tests, starting it when it is not running, under the repository repo with the tag of the image, and gives the address the cluster knows it by. Under the registry gate a lab node pulls every image through the gate from an upstream, so an image that is only loaded onto the nodes cannot be pulled: the gate has nothing to fetch it from. (registry.k8s.io cannot stand in as the upstream: it answers every manifest request with a redirect, which the gate never takes as a proof.)
func RemoveKindRegistry ¶ added in v1.10.0
func RemoveKindRegistry()
RemoveKindRegistry removes the upstream registry of the kind tests.
func UncommentCode ¶
UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines.
func UninstallCertManager ¶
func UninstallCertManager()
UninstallCertManager uninstalls the cert manager
func UninstallPrometheusOperator ¶
func UninstallPrometheusOperator()
UninstallPrometheusOperator uninstalls the prometheus
Types ¶
This section is empty.