Documentation ¶
Index ¶
- Constants
- func DeployCRDsForCluster(ctx context.Context, cluster clusters.Cluster) error
- func DeployControllerManagerForCluster(ctx context.Context, logger logr.Logger, cluster clusters.Cluster, ...) error
- func DeployRBACsForCluster(ctx context.Context, cluster clusters.Cluster) error
- func GetAdmissionWebhookListenHost() string
- func RandomName(prefix string) string
- func SetupLoggers(logLevel string, logFormat string) (logr.Logger, string, error)
Constants ¶
const AdmissionWebhookListenPort = 49023
Variables ¶
This section is empty.
Functions ¶
func DeployCRDsForCluster ¶
func DeployControllerManagerForCluster ¶
func DeployControllerManagerForCluster( ctx context.Context, 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 ¶
func GetAdmissionWebhookListenHost ¶
func GetAdmissionWebhookListenHost() string
GetAdmissionWebhookListenHost returns the host IP address depends on environment where the test is running.
func RandomName ¶
RandomName creates a unique name prepended with a predefined prefix. It can be used to populate .Name field of Kubernetes objects.
func SetupLoggers ¶
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.