test

package
v1.2.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// GatewayClassAcceptanceTimeLimit is the amount of time that the operator
	// will wait for a GatewayClass to be accepted.
	GatewayClassAcceptanceTimeLimit = time.Second * 7

	// GatewaySchedulingTimeLimit is the maximum amount of time to wait for
	// a supported Gateway to be marked as Scheduled by the gateway controller.
	GatewaySchedulingTimeLimit = time.Second * 7

	// GatewayReadyTimeLimit is the maximum amount of time to wait for a
	// supported Gateway to be fully provisioned and marked as Ready by the
	// gateway controller.
	GatewayReadyTimeLimit = time.Minute * 3
)
View Source
const (
	// ControlPlaneCondDeadline is the default timeout for checking on controlplane resources.
	ControlPlaneCondDeadline = time.Minute
	// ControlPlaneCondTick is the default tick for checking on controlplane resources.
	ControlPlaneCondTick = time.Second
	// ControlPlaneSchedulingTimeLimit is the maximum amount of time to wait for
	// a supported ControlPlane to be created after a Gateway resource is
	// created
	ControlPlaneSchedulingTimeLimit = time.Minute * 3

	// DataPlaneCondDeadline is the default timeout for checking on dataplane resources.
	DataPlaneCondDeadline = 1 * time.Minute
	// DataPlaneCondTick is the default tick for checking on dataplane resources.
	DataPlaneCondTick = 2 * time.Second
)
View Source
const (
	// WaitIngressTick is the default timeout tick interval for checking on ingress resources.
	WaitIngressTick = time.Second * 1
	// DefaultIngressWait is the default timeout for checking on ingress resources.
	DefaultIngressWait = time.Minute * 3
)
View Source
const (
	// httpBinImage is the container image name we use for deploying the "httpbin" HTTP testing tool.
	// if you need a simple HTTP server for tests you're writing, use this and check the documentation.
	// See: https://github.com/kong/httpbin
	HTTPBinImage = "kong/httpbin:0.1.0"

	// tcpEchoImage echoes TCP text sent to it after printing out basic information about its environment, e.g.
	// Welcome, you are connected to node kind-control-plane.
	// Running on Pod tcp-echo-58ccd6b78d-hn9t8.
	// In namespace foo.
	// With IP address 10.244.0.13.
	TCPEchoImage = "kong/go-echo:0.1.0"
)
View Source
const (
	// ObjectUpdateTimeout is the amount of time that will be allowed for
	// conflicts to be resolved before an object update will be considered failed.
	ObjectUpdateTimeout = time.Second * 30

	// SubresourceReadinessWait is the maximum amount of time allowed for
	// sub-resources to become "Ready" after being created on behalf of a
	// parent resource.
	SubresourceReadinessWait = time.Second * 30

	// DefaultHTTPPort is the default HTTP port.
	DefaultHTTPPort = 80

	// AIGatewayCRDPath points to the CRD descriptor for AI Gateways, for use
	// throughout tests.
	AIGatewayCRDPath = "/bases/gateway-operator.konghq.com_aigateways.yaml"
)
View Source
const (
	// GatewayStandardCRDsKustomizeURL is a URL that provides standard Gateway API CRDs.
	GatewayStandardCRDsKustomizeURL = "github.com/kubernetes-sigs/gateway-api/config/crd/standard?ref=v1.0.0"
	// GatewayExperimentalCRDsKustomizeURL is a URL that provides experimental Gateway API CRDs.
	GatewayExperimentalCRDsKustomizeURL = "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.0.0"
	// GatewayRawRepoURL is the base URL to the raw Gateway API repository.
	GatewayRawRepoURL = "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.0.0"
)

Variables

This section is empty.

Functions

func BuildEnvironment

func BuildEnvironment(ctx context.Context, existingCluster string, builderOpts ...BuilderOpt) (environments.Environment, error)

BuildEnvironment builds the k8s environment for the tests. Args:

  • ctx: the context to use for the environment build.
  • existingCluster: the name of the existing cluster to use for the tests. If empty, a new kind cluster will be created.
  • builderOpts: accept a list of builder options that will be applied to the builder before buildling the environment.

Returns the environment on success and an error on failure.

func BuildMTLSCredentials

func BuildMTLSCredentials(ctx context.Context, k8sClient *kubernetes.Clientset, httpc *http.Client) error

BuildMTLSCredentials builds the mTLS credentials for the tests. Args:

  • ctx: the context to use.
  • k8sClient: the k8s client to use.
  • httpc: the http client to configure with the mTLS credentials.

func ControlPlaneCRBContainsCRAndSA

func ControlPlaneCRBContainsCRAndSA(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneCRBContainsCRAndSA is a helper function for tests that returns a function that can be used to check if the ClusterRoleBinding of a ControPlane has the reference of ClusterRole belonging to the ControlPlane and contains the service account used by the Deployment of the ControlPlane.

func ControlPlaneDetectedNoDataPlane

func ControlPlaneDetectedNoDataPlane(t *testing.T, ctx context.Context, controlPlane types.NamespacedName, clients K8sClients) func() bool

ControlPlaneDetectedNoDataPlane is a helper function for tests that returns a function that can be used to check if a ControlPlane detected unset dataplane. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasActiveDeployment

func ControlPlaneHasActiveDeployment(t *testing.T, ctx context.Context, controlplaneName types.NamespacedName, clients K8sClients) func() bool

ControlPlaneHasActiveDeployment is a helper function for tests that returns a function that can be used to check if a ControlPlane has an active deployment. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasAdmissionWebhookCertificateSecret

func ControlPlaneHasAdmissionWebhookCertificateSecret(t *testing.T, ctx context.Context, cp *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneHasAdmissionWebhookCertificateSecret is a helper function for tests that returns a function that can be used to check if a ControlPlane has an admission webhook certificate Secret. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasAdmissionWebhookConfiguration

func ControlPlaneHasAdmissionWebhookConfiguration(t *testing.T, ctx context.Context, cp *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneHasAdmissionWebhookConfiguration is a helper function for tests that returns a function that can be used to check if a ControlPlane has an admission webhook configuration.

func ControlPlaneHasAdmissionWebhookService

func ControlPlaneHasAdmissionWebhookService(t *testing.T, ctx context.Context, cp *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneHasAdmissionWebhookService is a helper function for tests that returns a function that can be used to check if a ControlPlane has an admission webhook Service. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasClusterRole

func ControlPlaneHasClusterRole(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneHasClusterRole is a helper function for tests that returns a function that can be used to check if a ControlPlane has a ClusterRole. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasClusterRoleBinding

func ControlPlaneHasClusterRoleBinding(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) func() bool

ControlPlaneHasClusterRoleBinding is a helper function for tests that returns a function that can be used to check if a ControlPlane has a ClusterRoleBinding. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneHasNReadyPods

func ControlPlaneHasNReadyPods(t *testing.T, ctx context.Context, controlplaneName types.NamespacedName, clients K8sClients, n int) func() bool

ControlPlaneHasNReadyPods checks if a ControlPlane has at least N ready Pods.

func ControlPlaneIsNotReady

func ControlPlaneIsNotReady(t *testing.T, ctx context.Context, controlplane types.NamespacedName, clients K8sClients) func() bool

ControlPlaneIsNotReady is a helper function for tests. It returns a function that can be used to check if a ControlPlane is marked as not Ready. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneIsProvisioned

func ControlPlaneIsProvisioned(t *testing.T, ctx context.Context, controlPlane types.NamespacedName, clients K8sClients) func() bool

ControlPlaneIsProvisioned is a helper function for tests that returns a function that can be used to check if a ControlPlane was provisioned. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneIsReady

func ControlPlaneIsReady(t *testing.T, ctx context.Context, controlplane types.NamespacedName, clients K8sClients) func() bool

ControlPlaneIsReady is a helper function for tests. It returns a function that can be used to check if a ControlPlane is marked as Ready. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneIsScheduled

func ControlPlaneIsScheduled(t *testing.T, ctx context.Context, controlPlane types.NamespacedName, operatorClient *clientset.Clientset) func() bool

ControlPlaneIsScheduled is a helper function for tests that returns a function that can be used to check if a ControlPlane was scheduled. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlaneUpdateEventually

func ControlPlaneUpdateEventually(t *testing.T, ctx context.Context, controlplaneNN types.NamespacedName, clients K8sClients, updateFunc func(*operatorv1beta1.ControlPlane)) func() bool

ControlPlaneUpdateEventually is a helper function for tests that returns a function that can be used to update the ControlPlane. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlanesClusterRoleBindingHasSubject

func ControlPlanesClusterRoleBindingHasSubject(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients, subject rbacv1.Subject) func() bool

ControlPlanesClusterRoleBindingHasSubject is a helper function for tests that returns a function that can be used to check if ControlPlane's ClusterRoleBinding contains the provided Subject. Should be used in conjunction with require.Eventually or assert.Eventually.

func ControlPlanesClusterRoleHasPolicyRule

func ControlPlanesClusterRoleHasPolicyRule(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients, pr rbacv1.PolicyRule) func() bool

ControlPlanesClusterRoleHasPolicyRule is a helper function for tests that returns a function that can be used to check if ControlPlane's ClusterRole contains the provided PolicyRule. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasActiveDeployment

func DataPlaneHasActiveDeployment(
	t *testing.T,
	ctx context.Context,
	dataplaneNN types.NamespacedName,
	ret *appsv1.Deployment,
	matchingLabels client.MatchingLabels,
	clients K8sClients,
) func() bool

DataPlaneHasActiveDeployment is a helper function for tests that returns a function that can be used to check if a DataPlane has an active deployment (that is, a Deployment that has at least 1 Replica and that all Replicas as marked as Available). Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasActiveService

func DataPlaneHasActiveService(t *testing.T, ctx context.Context, dataplaneName types.NamespacedName, ret *corev1.Service, clients K8sClients, matchingLabels client.MatchingLabels) func() bool

DataPlaneHasActiveService is a helper function for tests that returns a function that can be used to check if a DataPlane has an active proxy service. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasDeployment

func DataPlaneHasDeployment(
	t *testing.T,
	ctx context.Context,
	dataplaneName types.NamespacedName,
	ret *appsv1.Deployment,
	clients K8sClients,
	matchingLabels client.MatchingLabels,
	asserts ...func(appsv1.Deployment) bool,
) func() bool

DataPlaneHasDeployment is a helper function for tests that returns a function that can be used to check if a DataPlane has a Deployment. Optionally the caller can provide a list of assertions that will be checked against the found Deployment. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasHPA

func DataPlaneHasHPA(
	t *testing.T,
	ctx context.Context,
	dataplane *operatorv1beta1.DataPlane,
	ret *autoscalingv2.HorizontalPodAutoscaler,
	clients K8sClients,
) func() bool

DataPlaneHasHPA is a helper function for tests that returns a function that can be used to check if a DataPlane has an active HPA. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasNReadyPods

func DataPlaneHasNReadyPods(t *testing.T, ctx context.Context, dataplaneName types.NamespacedName, clients K8sClients, n int) func() bool

DataPlaneHasNReadyPods checks if a DataPlane has at least N ready Pods.

func DataPlaneHasService

func DataPlaneHasService(t *testing.T, ctx context.Context, dataplaneName types.NamespacedName, clients K8sClients, matchingLabels client.MatchingLabels) func() bool

DataPlaneHasService is a helper function for tests that returns a function that can be used to check if a DataPlane has a service created. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasServiceAndAddressesInStatus

func DataPlaneHasServiceAndAddressesInStatus(t *testing.T, ctx context.Context, dataplaneName types.NamespacedName, clients K8sClients) func() bool

DataPlaneHasServiceAndAddressesInStatus is a helper function for tests that returns a function that can be used to check if a DataPlane has: - a backing service name in its .Service status field - a list of addreses of its backing service in its .Addresses status field Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneHasServiceSecret

func DataPlaneHasServiceSecret(t *testing.T, ctx context.Context, dpNN, usingSvc types.NamespacedName, ret *corev1.Secret, clients K8sClients) func() bool

DataPlaneHasServiceSecret checks if a DataPlane's Service has one owned Secret.

func DataPlaneIsReady

func DataPlaneIsReady(t *testing.T, ctx context.Context, dataplane types.NamespacedName, operatorClient *clientset.Clientset) func() bool

DataPlaneIsReady is a helper function for tests that returns a function that can be used to check if a DataPlane is ready. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlanePredicate

func DataPlanePredicate(
	t *testing.T,
	ctx context.Context,
	dataplaneName types.NamespacedName,
	predicate func(dataplane *operatorv1beta1.DataPlane) bool,
	operatorClient *clientset.Clientset,
) func() bool

DataPlanePredicate is a helper function for tests that returns a function that can be used to check if a DataPlane has a certain state.

func DataPlaneServiceHasNActiveEndpoints

func DataPlaneServiceHasNActiveEndpoints(t *testing.T, ctx context.Context, serviceName types.NamespacedName, clients K8sClients, n int) func() bool

DataPlaneServiceHasNActiveEndpoints is a helper function for tests that returns a function that can be used to check if a Service has active endpoints. Should be used in conjunction with require.Eventually or assert.Eventually.

func DataPlaneUpdateEventually

func DataPlaneUpdateEventually(t *testing.T, ctx context.Context, dataplaneNN types.NamespacedName, clients K8sClients, updateFunc func(*operatorv1beta1.DataPlane)) func() bool

DataPlaneUpdateEventually is a helper function for tests that returns a function that can be used to update the DataPlane. Should be used in conjunction with require.Eventually or assert.Eventually.

func DeployCRDs

func DeployCRDs(ctx context.Context, crdPath string, operatorClient *operatorclient.Clientset, env environments.Environment) error

DeployCRDs deploys the CRDs commonly used in tests.

func GatewayClassIsAccepted

func GatewayClassIsAccepted(t *testing.T, ctx context.Context, gatewayClassName string, clients K8sClients) func() bool

GatewayClassIsAccepted is a helper function for tests that returns a function that can be used to check if a GatewayClass is accepted. Should be used in conjunction with require.Eventually or assert.Eventually.

func GatewayControlPlaneIsProvisioned

func GatewayControlPlaneIsProvisioned(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) func() bool

GatewayControlPlaneIsProvisioned returns a function that checks if a Gateway's ControlPlane is provisioned.

func GatewayDataPlaneIsReady

func GatewayDataPlaneIsReady(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) func() bool

GatewayDataPlaneIsReady returns a function that checks if a Gateway's DataPlane is ready.

func GatewayIPAddressExist

func GatewayIPAddressExist(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) func() bool

GatewayIPAddressExist checks if a Gateway has IP addresses.

func GatewayIsProgrammed

func GatewayIsProgrammed(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) func() bool

GatewayIsProgrammed returns a function that checks if a Gateway is programmed.

func GatewayIsScheduled

func GatewayIsScheduled(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) func() bool

GatewayIsScheduled returns a function that checks if a Gateway is scheduled.

func GatewayListenersAreProgrammed

func GatewayListenersAreProgrammed(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) func() bool

GatewayListenersAreProgrammed returns a function that checks if a Gateway's listeners are programmed.

func GatewayNetworkPoliciesExist

func GatewayNetworkPoliciesExist(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) func() bool

GatewayNetworkPoliciesExist is a helper function for tests that returns a function that can be used to check if a Gateway owns a networkpolicy. Should be used in conjunction with require.Eventually or assert.Eventually. Gateway object argument does need to exist in the cluster, thus, the function may be used with Not after the gateway has been deleted, to verify that the networkpolicy has been deleted too.

func GatewayNetworkPolicyForGatewayContainsRules

func GatewayNetworkPolicyForGatewayContainsRules[T ingressRuleT](t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients, rules ...T) func() bool

GatewayNetworkPolicyForGatewayContainsRules is a helper function for tets that returns a function that can be used to check if exactly 1 NetworkPolicy exist for Gateway and if it contains all the provided rules.

func GatewayNotExist

func GatewayNotExist(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) func() bool

GatewayNotExist is a helper function for tests that returns a function to check a if gateway(with specified namespace and name) does not exist.

Should be used in conjunction with require.Eventually or assert.Eventually.

func GenerateGateway

func GenerateGateway(gatewayNSN types.NamespacedName, gatewayClass *gatewayv1.GatewayClass, opts ...func(gateway *gatewayv1.Gateway)) *gwtypes.Gateway

GenerateGateway generates a Gateway to be used in tests

func GenerateGatewayClass

func GenerateGatewayClass() *gatewayv1.GatewayClass

GenerateGatewayClass generates the default GatewayClass to be used in tests

func GenerateGatewayConfiguration

func GenerateGatewayConfiguration(gatewayConfigurationNSN types.NamespacedName) *operatorv1beta1.GatewayConfiguration

GenerateGatewayConfiguration generates a GatewayConfiguration to be used in tests

func GetResponseBodyContains

func GetResponseBodyContains(t *testing.T, ctx context.Context, clients K8sClients, httpc http.Client, url string, method string, responseContains string) func() bool

GetResponseBodyContains issues an HTTP request and checks if a response body contains a string.

func HPAPredicate

func HPAPredicate(
	t *testing.T,
	ctx context.Context,
	hpaName types.NamespacedName,
	predicate func(hpa *autoscalingv2.HorizontalPodAutoscaler) bool,
	client client.Client,
) func() bool

HPAPredicate is a helper function for tests that returns a function that can be used to check if an HPA has a certain state.

func MustGetGateway

func MustGetGateway(t *testing.T, ctx context.Context, gatewayNSN types.NamespacedName, clients K8sClients) *gwtypes.Gateway

MustGetGateway is a helper function for tests that conveniently gets a gateway by name. It will fail the test if getting the gateway fails.

func MustListControlPlaneClusterRoleBindings

func MustListControlPlaneClusterRoleBindings(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) []rbacv1.ClusterRoleBinding

MustListControlPlaneClusterRoleBindings is a helper function for tests that conveniently lists all clusterrolebindings owned by a given controlplane.

func MustListControlPlaneClusterRoles

func MustListControlPlaneClusterRoles(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) []rbacv1.ClusterRole

MustListControlPlaneClusterRoles is a helper function for tests that conveniently lists all clusterroles owned by a given controlplane.

func MustListControlPlaneDeployments

func MustListControlPlaneDeployments(t *testing.T, ctx context.Context, controlplane *operatorv1beta1.ControlPlane, clients K8sClients) []appsv1.Deployment

mustListControlPlaneDeployments is a helper function for tests that conveniently lists all deployments managed by a given controlplane.

func MustListControlPlanesForGateway

func MustListControlPlanesForGateway(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) []operatorv1beta1.ControlPlane

MustListControlPlanesForGateway is a helper function for tests that conveniently lists all controlplanes managed by a given gateway.

func MustListDataPlaneDeployments

func MustListDataPlaneDeployments(t *testing.T, ctx context.Context, dataplane *operatorv1beta1.DataPlane, clients K8sClients, matchinglabels client.MatchingLabels) []appsv1.Deployment

MustListDataPlaneDeployments is a helper function for tests that conveniently lists all deployments managed by a given dataplane.

func MustListDataPlaneHPAs

func MustListDataPlaneHPAs(t *testing.T, ctx context.Context, dataplane *operatorv1beta1.DataPlane, clients K8sClients, matchinglabels client.MatchingLabels) []autoscalingv2.HorizontalPodAutoscaler

MustListDataPlaneHPAs is a helper function for tests that conveniently lists all HPAs managed by a given dataplane.

func MustListDataPlaneServices

func MustListDataPlaneServices(t *testing.T, ctx context.Context, dataplane *operatorv1beta1.DataPlane, mgrClient client.Client, matchingLabels client.MatchingLabels) []corev1.Service

MustListDataPlaneServices is a helper function for tests that conveniently lists all proxy services managed by a given dataplane.

func MustListDataPlanesForGateway

func MustListDataPlanesForGateway(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) []operatorv1beta1.DataPlane

MustListDataPlanesForGateway is a helper function for tests that conveniently lists all dataplanes managed by a given gateway.

func MustListNetworkPoliciesForGateway

func MustListNetworkPoliciesForGateway(t *testing.T, ctx context.Context, gateway *gwtypes.Gateway, clients K8sClients) []networkingv1.NetworkPolicy

MustListNetworkPoliciesForGateway is a helper function for tests that conveniently lists all NetworkPolicies managed by a given gateway.

func MustListServiceEndpointSlices

func MustListServiceEndpointSlices(t *testing.T, ctx context.Context, serviceName types.NamespacedName, mgrClient client.Client) []discoveryv1.EndpointSlice

MustListServiceEndpointSlices is a helper function for tests that conveniently lists all endpointSlices related to a specific service.

func Not

func Not(predicate func() bool) func() bool

Not is a helper function for tests that returns a negation of a predicate.

func SetupControllerLogger

func SetupControllerLogger(controllerManagerOut string) (func() error, error)

SetupControllerLogger sets up the controller logger. This functions needs to be called before 30sec after the controller packages is loaded, otherwise the logger will not be initialized. Args:

  • controllerManagerOut: the path to the file where the controller logs should be written to or "stdout".

Returns:

  • The close function, that will close the log file if one was created. Should be called after the tests are done.
  • An error on failure.

Types

type BuilderOpt

type BuilderOpt func(*environments.Builder, clusters.Type)

BuilderOpt is an option function for an environment builder.

type K8sClients

type K8sClients struct {
	K8sClient      *kubernetesclient.Clientset
	OperatorClient *operatorclient.Clientset
	GatewayClient  *gatewayclient.Clientset
	MgrClient      ctrlruntimeclient.Client
}

K8sClients is a struct that contains all the Kubernetes clients needed by the tests.

func NewK8sClients

func NewK8sClients(env environments.Environment) (K8sClients, error)

NewK8sClients returns a new K8sClients struct with all the clients needed by the tests.

Jump to

Keyboard shortcuts

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