You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
e2e: reach clusterip clusters from the external test harness #923
The e2e suite runs the operator in the pytest process (kopf_runner), outside the test cluster, with CRATEDB_OPERATOR_TESTING=true. In that mode get_host connects through the data service's LB address, or externalDNS for traefik. A clusterip cluster has neither, so get_host raises TemporaryError until the test ends. The clusterip e2e tests therefore use wait_for_healthy=False and never connect: bootstrap, health and suspend/resume are not tested end to end for clusterip.
Production is not affected. Outside test mode get_host always returns the headless crate-discovery-<name>.<namespace>, and #920 has a unit test that pins this for every exposure.
Options
Port-forward (preferred): in test mode, forward a local port to a CrateDB pod through the Kubernetes API. get_host returns only a host and connection_factory always uses port 5432, so the port must be passed through as well. No test-only code in operator handlers.
Test-only LB service: the test creates an extra LoadBalancer service with the data-service selector, and test-mode get_host uses it for clusterip. Cheap, but adds a test-only path to operator code.
On minikube, minikube tunnel also routes the service CIDR, but that does not help the AKS nightly job.
Activity