Skip to main content

Gateway Domain

The Gateway domain configures the API Gateway at runtime. It manages routes, consumers, and their access relationships. While the architecture is designed to be gateway-agnostic, the current implementation uses Kong as the underlying gateway technology.

Custom Resources​

Consumer​

Consumer is the Schema for the consumers API

Group: gateway.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

ConsumerSpec​

Appears in: Consumer

ConsumerSpec defines the desired state of Consumer

FieldTypeDefaultValidation
gatewayObjectRef—Required
namestring—Required
securitySecurity—Optional

ObjectRef​

Appears in: ConsumerSpec, ConsumeRouteSpec, RouteSpec

ObjectRef is a reference to a Kubernetes object It is similar to types.NamespacedName but has the required json tags for serialization

FieldTypeDefaultValidation
namestring—Required
namespacestring—Required
uidstring—Optional

Security​

Appears in: ConsumerSpec

Security defines the security configuration for the Rover Security is optional, but if provided, exactly one of m2m or h2m must be set

FieldTypeDefaultValidation
ipRestrictionsIpRestrictions—Optional

IpRestrictions​

Appears in: Security

FieldTypeDefaultValidation
allowstring[]—Optional
denystring[]—Optional

ConsumerStatus​

Appears in: Consumer, ConsumeRoute

ConsumerStatus defines the observed state of Consumer

FieldTypeDefaultValidation
conditionsCondition[]—Optional
propertiesmap<string, string>—Optional

Condition​

Appears in: ConsumerStatus, GatewayStatus, RouteStatus

FieldTypeDefaultValidation
lastTransitionTimestring—Required, Format: date-time
messagestring—Required, maxLength: 32768
observedGenerationinteger—Optional, Format: int64, minimum: 0
reasonstring—Required, minLength: 1, maxLength: 1024, pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
statusstring—Required, Enum: True \| False \| Unknown
typestring—Required, maxLength: 316, pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$

ConsumeRoute​

ConsumeRoute is the Schema for the consumeroutes API

Group: gateway.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

ConsumeRouteSpec​

Appears in: ConsumeRoute

ConsumeRouteSpec defines the desired state of ConsumeRoute

FieldTypeDefaultValidation
consumerNamestring—Required
routeObjectRef—Required
securityConsumeRouteSecurity—Optional
trafficTraffic—Optional

ConsumeRouteSecurity​

Appears in: ConsumeRouteSpec

FieldTypeDefaultValidation
m2mM2M—Optional

M2M​

Appears in: ConsumeRouteSecurity

M2M defines machine-to-machine authentication configuration

FieldTypeDefaultValidation
basicBasic—Optional
clientClient—Optional
scopesstring[]—Optional, maxItems: 100

Basic​

Appears in: M2M, RouteM2M, ExternalIDP

Basic defines basic authentication configuration

FieldTypeDefaultValidation
passwordstring—Required, minLength: 1
usernamestring—Required, minLength: 1

Client​

Appears in: M2M, ExternalIDP

Client defines client credentials for OAuth2

FieldTypeDefaultValidation
clientIdstring—Required, minLength: 1
clientKeystring—Optional
clientSecretstring—Optional
refreshTokenstring—Optional

Traffic​

Appears in: ConsumeRouteSpec

FieldTypeDefaultValidation
rateLimitRateLimit—Optional

RateLimit​

Appears in: Traffic

RateLimit defines the rate limit configuration for the ConsumeRoute

FieldTypeDefaultValidation
limitsLimits—Required

Limits​

Appears in: RateLimit, RouteRateLimit

Limits defines the actual rate limit values for different time windows

FieldTypeDefaultValidation
hourinteger—Optional, minimum: 0
minuteinteger—Optional, minimum: 0
secondinteger—Optional, minimum: 0

Gateway​

Gateway is the Schema for the gateways API

Group: gateway.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

GatewaySpec​

Appears in: Gateway

GatewaySpec defines the desired state of Gateway

FieldTypeDefaultValidation
adminAdmin—Required
featuresstring[]—Optional
redisRedis—Optional

Admin​

Appears in: GatewaySpec

FieldTypeDefaultValidation
clientIdstring—Required
clientSecretstring—Required
issuerUrlstring—Required
urlstring—Required

Redis​

Appears in: GatewaySpec

FieldTypeDefaultValidation
enableTLSboolean—Required
hoststring—Required
passwordstring—Required
portinteger—Required

GatewayStatus​

Appears in: Gateway

GatewayStatus defines the observed state of Gateway

FieldTypeDefaultValidation
conditionsCondition[]—Optional

Route​

Route is the Schema for the routes API

Group: gateway.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

RouteSpec​

Appears in: Route

spec defines the desired state of Route

FieldTypeDefaultValidation
additionalTagsstring[]—Optional
backendBackend—Required
bufferingBuffering—Optional
gatewayRefObjectRef—Required
hostnamesstring[]—Optional, minItems: 0, maxItems: 20
passThroughbooleanfalseRequired
pathsstring[]/Optional, minItems: 1, maxItems: 10
securityRouteSecurity—Optional
trafficRouteTraffic—Required
transformationTransformation—Optional
typestringprimaryRequired, Enum: primary \| secondary \| proxy

Backend​

Appears in: RouteSpec

Backend defines the backend for this route. Only one of Backend or Traffic can be set.

FieldTypeDefaultValidation
upstreamsUpstreams[]—Required, minItems: 1, maxItems: 10

Upstreams​

Appears in: Backend

Upstreams defines the upstream targets for this route. If multiple targets are defined, they will be load balanced according to their weight.

FieldTypeDefaultValidation
hostnamestring—Required
pathstring—Required
portinteger—Required, Format: int32
schemestring—Required
weightinteger—Optional, Format: int32

Buffering​

Appears in: RouteSpec

Buffering configures Kong request/response body buffering for this route

FieldTypeDefaultValidation
disableRequestBufferingbooleanfalseOptional
disableResponseBufferingbooleanfalseOptional

RouteSecurity​

Appears in: RouteSpec, Failover

Security is the security configuration for the route

FieldTypeDefaultValidation
defaultConsumersstring[]—Optional
disableAccessControlbooleanfalseOptional
m2mRouteM2M—Optional
realmNamestring—Required
trustedIssuersstring[]—Optional, minItems: 0

RouteM2M​

Appears in: RouteSecurity

M2M defines machine-to-machine authentication configuration

FieldTypeDefaultValidation
basicBasic—Optional
claimsClaims[]—Optional
externalIDPExternalIDP—Optional
scopesstring[]—Optional, maxItems: 100

Claims​

Appears in: RouteM2M

Claims defines token claims applied to all consumers (the "default" bucket)

FieldTypeDefaultValidation
keystring—Required, Enum: aud
valuestring—Optional, minLength: 1, maxLength: 256
valueFromstring—Optional, Enum: ConsumerClientId

ExternalIDP​

Appears in: RouteM2M

ExternalIDP defines external identity provider configuration

FieldTypeDefaultValidation
basicBasic—Optional
clientClient—Optional
grantTypestring—Required, Enum: client_credentials \| authorization_code \| password \| refresh_token
tokenEndpointstring—Required, Format: uri
tokenRequeststring—Required, Enum: client_secret_basic \| client_secret_post

RouteTraffic​

Appears in: RouteSpec

Traffic defines the traffic configuration for this route.

FieldTypeDefaultValidation
circuitBreakerCircuitBreaker—Optional
dynamicUpstreamDynamicUpstream—Optional
failoverFailover—Optional
healthProbeboolean—Optional
rateLimitRouteRateLimit—Optional

CircuitBreaker​

Appears in: RouteTraffic

FieldTypeDefaultValidation
enabledboolean—Optional

DynamicUpstream​

Appears in: RouteTraffic

DynamicUpstream configures runtime upstream URL resolution. When set, the gateway resolves the actual upstream target from a request query parameter instead of using the static upstream.

FieldTypeDefaultValidation
queryParameterstring—Required, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$

Failover​

Appears in: RouteTraffic

FieldTypeDefaultValidation
securityRouteSecurity—Optional
targetZoneNamestring—Required
targetsTarget[]—Required

Target​

Appears in: Failover

FieldTypeDefaultValidation
hostnamestring—Required
pathstring—Required
portinteger—Required, Format: int32
schemestring—Required
weightinteger—Optional, Format: int32
zoneNamestring—Optional

RouteRateLimit​

Appears in: RouteTraffic

RateLimit defines rate limits for different time windows

FieldTypeDefaultValidation
limitsLimits—Required
optionsOptions—Optional

Options​

Appears in: RouteRateLimit

Options defines additional configuration options for rate limiting

FieldTypeDefaultValidation
faultTolerantbooleantrueOptional
hideClientHeadersbooleanfalseOptional

Transformation​

Appears in: RouteSpec

Transformation defines optional request/response transformations for this API

FieldTypeDefaultValidation
requestRequest—Optional

Request​

Appears in: Transformation

Request defines transformations applied to incoming API requests

FieldTypeDefaultValidation
headersHeaders—Optional

Headers​

Appears in: Request

Headers defines HTTP header modifications for requests

FieldTypeDefaultValidation
addstring[]—Optional, minItems: 1, maxItems: 5
removestring[]—Optional, minItems: 1, maxItems: 5

RouteStatus​

Appears in: Route

status defines the observed state of Route

FieldTypeDefaultValidation
conditionsCondition[]—Optional
consumersstring[]—Optional
propertiesmap<string, string>—Optional

Feature Architecture​

The Gateway operator uses a plugin-based feature system for configuring route behavior. Each feature is implemented as a separate plugin that can be enabled or disabled per route, allowing fine-grained control over how requests are processed.

Host Preservation​

A Route's spec.passThrough also sets Kong's preserve_host. Passthrough routes forward the incoming Host header to the upstream. All other routes keep Kong's default, false, so the upstream gets its own hostname. There is no separate setting for this. Reconciliation fixes drift in either direction. Upstreams behind passthrough routes, such as managed Proxy routes, must accept the public Host.

Health Probes​

Admin creates a passthrough Route per gateway with spec.traffic.healthProbe: true and placeholder upstream http://localhost:8081/api/v1/zone-health. The Kong client restricts flagged routes to HEAD, and the builder attaches the request-termination plugin with status 200. The service is required by Kong, but never called. This checks gateway reachability and route configuration, not backend health.

healthProbe is an optional boolean, false when omitted. Unflagged routes keep normal behavior even with the same upstream path. Reconciliation corrects method drift, and disabling the flag clears the restriction and cleans up the plugin. Other HTTP methods do not match the health route, although another overlapping route can match them. No separate methods field is needed. Deploy the updated Route CRD and Gateway controller before Admin.

Audience Claim Resolution​

An API provider can require that every token reaching its backend carries an audience claim (aud), so the backend can confirm the token was meant for it. The provider declares this once on the API exposure, and the platform makes sure the claim is present on all traffic to that API.

The interesting part is who decides the actual value. Some sources are known when the API is configured, while one can only be known at the moment of each request. The Control Plane resolves as much as possible up front and leaves the rest to the request-time token service.

SourceKnown at configuration time?Resolved byResult
Fixed valueYesThe userThe literal value is used as-is.
Provider identifierYes — always the exposing applicationControl PlaneFilled in as a literal value.
Base pathYesControl PlaneFilled in as a literal value.
Consumer identifierNo — differs for every consumerRequest-time token serviceLeft as a symbolic reference and filled in per request.

The consumer identifier cannot be decided in advance: a single exposed API is shared by many consumers, so one fixed value could never represent all of them. Instead, the platform records the source symbolically, and the token service reads the calling consumer's identity from the incoming request and stamps it onto the outgoing token.

The resolved claims are grouped into a default bucket that applies to all consumers of the API. The audience claim is declared only on the API exposure by the provider; consumers do not configure it.

info

The audience claim is configured by API teams on their Rover file. See Security: Audience Claims for the user-facing configuration.

Route Types & Cross-Zone Meshing​

Every gateway Route has a type that determines where it sends traffic. Together, these three types let consumers and providers live in different zones while still reaching each other — a pattern we call meshing.

TypeLives inSends traffic toPurpose
PrimaryThe provider's zoneThe provider's backend upstreams directlyThe single egress point for an API. Every other route ultimately targets it.
ProxyA subscriber's zone (when different from the provider's)The provider zone's gateway (the primary route)Forwards cross-zone requests. It never talks to the backend itself.
SecondaryA provider failover zoneThe provider's backend upstreams (as a backup)Stand-in for the primary route when the provider's primary zone is unhealthy.

Why proxy routes exist​

A consumer always sends its request to the gateway in its own zone. If the API it wants is exposed in a different zone, that local gateway has no backend to call — so the Control Plane creates a proxy route there. The proxy route accepts the consumer's request, validates its token, and forwards the call across the zone boundary to the provider zone's primary route, which finally reaches the backend.

This keeps every consumer talking to a local gateway while the platform handles the cross-zone hop transparently.

If the consumer lives in the same zone as the provider, no proxy route is needed — the consumer reaches the primary route directly.

Secondary routes and failover​

When a provider declares a failover zone, the Control Plane creates a secondary route there carrying a copy of the provider's upstreams. The proxy routes are configured with the failover zone as a fallback target. A health-check service watches the provider's primary zone; if it becomes unhealthy, proxy routes redirect to the secondary route instead of the primary one, and traffic is served from the backup zone.

info

Route types are created by the API domain, not configured by hand. See API Domain: Route Provisioning for which resource creates which route, and Failover for the operator-facing setup.

Additional route tags​

Route.spec.additionalTags is an optional list of strings. The Gateway operator merges these values unchanged with its built-in Kong Route tags. They do not apply to Kong Services.

API and Agentic controllers use this field for traffic classification, with tags such as variant--default and variant--mcp.

Domain Interactions​

  • Admin domain — Zones define which gateway instance to use.
  • API domain — Creates Routes for exposed APIs and ConsumeRoutes for subscriptions.
  • Application domain — Creates Consumers for applications.
  • Organization domain — Creates Consumers for teams.
  • Event domain — Creates Routes for event publishing and SSE delivery.
  • Rover domain — Configures rate limiting and load balancing via traffic management settings.