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
refactor: derive Gateway routes from node mode with listener-based hostnames (#69)
* refactor: derive Gateway routes from node mode with listener-based hostname pattern
Replace baseDomain/hostnames CRD fields with mode-derived route
generation. The Gateway owns the protocol topology — deployments
just attach to it.
Key changes:
- Remove Hostnames, BaseDomain from GatewayRouteConfig (CRD simplification)
- Merge evm-rpc + evm-ws into single "evm" listener (industry standard)
- Derive listeners from node mode via NodePortsForMode():
full/archive → evm, rpc, rest, grpc (4 routes)
validator → none (no public traffic)
- Hostnames follow {deployment}.{protocol}.{domain} pattern
- Add SEI_GATEWAY_DOMAIN platform env var for hostname construction
- Gateway config on CRD just needs to exist (non-nil) to enable routing
Example: SeiNodeDeployment "pacific-1" with domain "prod.platform.sei.io":
pacific-1.evm.prod.platform.sei.io → :8545
pacific-1.rpc.prod.platform.sei.io → :26657
pacific-1.rest.prod.platform.sei.io → :1317
pacific-1.grpc.prod.platform.sei.io → :9090
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: always generate HTTPRoutes from mode, make gateway field optional
Address PR review feedback:
- Routes are now always generated when networking is configured and the
node mode has public ports. The gateway field is only needed for
custom annotations on HTTPRoutes.
- Remove CEL validation requiring gateway when service is configured
- Remove gateway: {} from sample manifest (no longer needed)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@@ -55,20 +56,11 @@ type ExternalServiceConfig struct {
55
56
// targeting the platform Gateway (configured via SEI_GATEWAY_NAME and
56
57
// SEI_GATEWAY_NAMESPACE environment variables on the controller).
57
58
//
58
-
// +kubebuilder:validation:XValidation:rule=”(has(self.hostnames) && size(self.hostnames) > 0) || (has(self.baseDomain) && size(self.baseDomain) > 0)”,message=”at least one of hostnames or baseDomain must be set”
59
+
// Hostnames are derived automatically from the deployment name, protocol,
60
+
// and the platform domain (SEI_GATEWAY_DOMAIN). Which protocols get
61
+
// HTTPRoutes is determined by the node mode via seiconfig.NodePortsForMode.
59
62
typeGatewayRouteConfigstruct {
60
-
// Hostnames routes all listed hostnames to the RPC port (26657).
61
-
// For multi-protocol routing, use BaseDomain instead.
62
-
// +optional
63
-
Hostnames []string`json:"hostnames,omitempty"`
64
-
65
-
// BaseDomain generates HTTPRoutes for all standard Sei protocols
66
-
// using conventional subdomain prefixes (rpc.*, rest.*, grpc.*,
67
-
// evm-rpc.*, evm-ws.*), each routing to the correct backend port.
68
-
// +optional
69
-
BaseDomainstring`json:"baseDomain,omitempty"`
70
-
71
-
// Annotations are merged onto the HTTPRoute metadata.
63
+
// Annotations are merged onto HTTPRoute metadata.
0 commit comments