package
1.3.0
Repository: https://github.com/kong/gateway-operator.git
Documentation: pkg.go.dev

# Functions

BuildEnvironment builds the k8s environment for the tests.
BuildMTLSCredentials builds the mTLS credentials for the tests.
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.
ControlPlaneDetectedNoDataPlane is a helper function for tests that returns a function that can be used to check if a ControlPlane detected unset dataplane.
ControlPlaneHasActiveDeployment is a helper function for tests that returns a function that can be used to check if a ControlPlane has an active deployment.
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.
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.
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.
ControlPlaneHasClusterRole is a helper function for tests that returns a function that can be used to check if a ControlPlane has a ClusterRole.
ControlPlaneHasClusterRoleBinding is a helper function for tests that returns a function that can be used to check if a ControlPlane has a ClusterRoleBinding.
ControlPlaneHasNReadyPods checks if a ControlPlane has at least N ready Pods.
ControlPlaneIsNotReady is a helper function for tests.
ControlPlaneIsProvisioned is a helper function for tests that returns a function that can be used to check if a ControlPlane was provisioned.
ControlPlaneIsReady is a helper function for tests.
ControlPlaneIsScheduled is a helper function for tests that returns a function that can be used to check if a ControlPlane was scheduled.
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.
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.
ControlPlaneUpdateEventually is a helper function for tests that returns a function that can be used to update the ControlPlane.
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).
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.
DataPlaneHasDeployment is a helper function for tests that returns a function that can be used to check if a DataPlane has a Deployment.
DataPlaneHasHPA is a helper function for tests that returns a function that can be used to check if a DataPlane has an active HPA.
DataPlaneHasNReadyPods checks if a DataPlane has at least N ready Pods.
DataPlaneHasService is a helper function for tests that returns a function that can be used to check if a DataPlane has a service created.
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.
DataPlaneHasServiceSecret checks if a DataPlane's Service has one owned Secret.
DataPlaneIsReady is a helper function for tests that returns a function that can be used to check if a DataPlane is ready.
DataPlanePredicate is a helper function for tests that returns a function that can be used to check if a DataPlane has a certain state.
DataPlaneServiceHasNActiveEndpoints is a helper function for tests that returns a function that can be used to check if a Service has active endpoints.
DataPlaneUpdateEventually is a helper function for tests that returns a function that can be used to update the DataPlane.
DeployCRDs deploys the CRDs commonly used in tests.
GatewayClassIsAccepted is a helper function for tests that returns a function that can be used to check if a GatewayClass is accepted.
GatewayControlPlaneIsProvisioned returns a function that checks if a Gateway's ControlPlane is provisioned.
GatewayDataPlaneIsReady returns a function that checks if a Gateway's DataPlane is ready.
GatewayIPAddressExist checks if a Gateway has IP addresses.
GatewayIsAccepted returns a function that checks if a Gateway is scheduled.
GatewayIsProgrammed returns a function that checks if a Gateway is programmed.
GatewayListenersAreProgrammed returns a function that checks if a Gateway's listeners are programmed.
GatewayNetworkPoliciesExist is a helper function for tests that returns a function that can be used to check if a Gateway owns a networkpolicy.
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.
GatewayNotExist is a helper function for tests that returns a function to check a if gateway(with specified namespace and name) does not exist.
GetResponseBodyContains issues an HTTP request and checks if a response body contains a string.
HPAPredicate is a helper function for tests that returns a function that can be used to check if an HPA has a certain state.
MustGetGateway is a helper function for tests that conveniently gets a gateway by name.
MustListControlPlaneClusterRoleBindings is a helper function for tests that conveniently lists all clusterrolebindings owned by a given controlplane.
MustListControlPlaneClusterRoles is a helper function for tests that conveniently lists all clusterroles owned by a given controlplane.
mustListControlPlaneDeployments is a helper function for tests that conveniently lists all deployments managed by a given controlplane.
MustListControlPlanesForGateway is a helper function for tests that conveniently lists all controlplanes managed by a given gateway.
MustListDataPlaneDeployments is a helper function for tests that conveniently lists all deployments managed by a given dataplane.
MustListDataPlaneHPAs is a helper function for tests that conveniently lists all HPAs managed by a given dataplane.
MustListDataPlaneServices is a helper function for tests that conveniently lists all proxy services managed by a given dataplane.
MustListDataPlanesForGateway is a helper function for tests that conveniently lists all dataplanes managed by a given gateway.
MustListNetworkPoliciesForGateway is a helper function for tests that conveniently lists all NetworkPolicies managed by a given gateway.
MustListServiceEndpointSlices is a helper function for tests that conveniently lists all endpointSlices related to a specific service.
NewK8sClients returns a new K8sClients struct with all the clients needed by the tests.
Not is a helper function for tests that returns a negation of a predicate.
SetupControllerLogger sets up the controller logger.

# Constants

AIGatewayCRDPath points to the CRD descriptor for AI Gateways, for use throughout tests.
ControlPlaneCondDeadline is the default timeout for checking on controlplane resources.
ControlPlaneCondTick is the default tick for checking on controlplane resources.
ControlPlaneSchedulingTimeLimit is the maximum amount of time to wait for a supported ControlPlane to be created after a Gateway resource is created.
DataPlaneCondDeadline is the default timeout for checking on dataplane resources.
DataPlaneCondTick is the default tick for checking on dataplane resources.
DefaultHTTPPort is the default HTTP port.
DefaultIngressWait is the default timeout for checking on ingress resources.
GatewayClassAcceptanceTimeLimit is the amount of time that the operator will wait for a GatewayClass to be accepted.
GatewayExperimentalCRDsKustomizeURL is a URL that provides experimental Gateway API CRDs.
GatewayRawRepoURL is the base URL to the raw Gateway API repository.
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.
GatewaySchedulingTimeLimit is the maximum amount of time to wait for a supported Gateway to be marked as Scheduled by the gateway controller.
GatewayStandardCRDsKustomizeURL is a URL that provides standard Gateway API CRDs.
httpBinImage is the container image name we use for deploying the "httpbin" HTTP testing tool.
ObjectUpdateTimeout is the amount of time that will be allowed for conflicts to be resolved before an object update will be considered failed.
SubresourceReadinessWait is the maximum amount of time allowed for sub-resources to become "Ready" after being created on behalf of a parent resource.
tcpEchoImage echoes TCP text sent to it after printing out basic information about its environment, e.g.
WaitIngressTick is the default timeout tick interval for checking on ingress resources.

# Structs

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

# Type aliases

BuilderOpt is an option function for an environment builder.