Conversation
| id="services", | ||
| ) | ||
|
|
||
| if exposure == "traefik": |
There was a problem hiding this comment.
Wondering if we need to me more explicit in naming here (IngressRouteTCP), in future we might switch to Gateway API's TLSRoute...
There was a problem hiding this comment.
hmm, good point. do you think renaming traefik to ingressRouteTcp is fine, or should we split it into sth like exposure: loadbalancer | clusterip and add a separate field ingressController: traefik | gateway | none?
There was a problem hiding this comment.
For now it is fine, we can always change it.
b495868 to
8e81e6b
Compare
6cac9df to
7e68cd7
Compare
7e68cd7 to
f7df78f
Compare
|
I've deployed on Dev and tried converting a DB -> ✅ cc @tomach : Logs[2026-04-29 17:33:02,513] kopf.objects [INFO ] [0fdb256a-cb6b-44b2-b97f-fc8be6949d95/3c48548b-47a5-44f9-ba7c-4ffd4065e1e2] Patching MiddlewareTCP cratedb-allow-3c48548b-47a5-44f9-ba7c-4ffd4065e1e2 with new CIDRs ['5.32.131.18/32', '213.222.49.221/32'] | [2026-04-29 17:33:02,555] kopf.objects [ERROR ] [0fdb256a-cb6b-44b2-b97f-fc8be6949d95/3c48548b-47a5-44f9-ba7c-4ffd4065e1e2] Handler 'service_cidr_changes/spec.cluster.allowedCIDRs' failed with an exception. Will retry. | |


Summary
This introduces
spec.cluster.exposureto optionally expose CrateDB clusters via Traefik (IngressRouteTCP) instead of aLoadBalancer. This reduces load balancer quota usage (e.g., on AWS).Changes
CRD
exposureenum field (loadbalancer|traefik). Defaults toloadbalancerin the operator.Service creation
exposure: traefik, the operator creates aClusterIPservice.aws-load-balancer-*,azure-load-balancer-*) are only added forloadbalancer.Traefik resources (for
exposure: traefik)MiddlewareTCP- created only ifallowedCIDRsis non‑empty (IP allowlist).IngressRouteTCP(ports 4200 & 5432) - reference the middleware when it exists.CIDR updates
allowedCIDRschanges, the operator updates the Traefik middleware accordingly and adjusts theIngressRouteTCProutes to add/remove the middleware reference.Exposure changes
exposurefromloadbalancer<>traefikpatches the existing serviceSuspend / Resume
RBAC
traefik.io/middlewaretcpsandingressroutetcps(create, get, list, watch, patch, delete).Backward Compatibility
exposurefield continue usingloadbalancer- no breaking change.Checklist
CHANGES.rst