test

package
v2.12.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AdmissionWebhookListenPort = 49023
)

Variables

View Source
var AdmissionWebhookListenHost = admissionWebhookListenHost()

Functions

func DeployCRDsForCluster

func DeployCRDsForCluster(ctx context.Context, cluster clusters.Cluster) error

func DeployControllerManagerForCluster

func DeployControllerManagerForCluster(
	ctx context.Context,
	deprecatedLogger logrus.FieldLogger,
	logger logr.Logger,
	cluster clusters.Cluster,
	additionalFlags ...string,
) error

DeployControllerManagerForCluster deploys all the base CRDs needed for the controller manager to function, and also runs a copy of the controller manager on a provided test cluster.

Controller managers started this way will run in the background in a goroutine: The caller must use the provided context.Context to stop the controller manager from running when they're done with it.

func DeployRBACsForCluster added in v2.11.0

func DeployRBACsForCluster(ctx context.Context, cluster clusters.Cluster) error

func RandomName added in v2.8.0

func RandomName(prefix string) string

RandomName creates a unique name prepended with a predefined prefix. It can be used to populate .Name field of Kubernetes objects.

func SetupLoggers added in v2.5.1

func SetupLoggers(logLevel string, logFormat string, logReduceRedundancy bool) (logrus.FieldLogger, logr.Logger, string, error)

SetupLoggers sets up the loggers for the controller manager. The controller manager logs needs to be setup before the 30s timeout passes. Given the cluster deployment takes time, there is a chance that the timeout will pass before the controller manager logs are setup. This function can be used to sets up the loggers for the controller manager before the cluster deployment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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