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
| Field | Type | Default | Validation |
|---|---|---|---|
gateway | ObjectRef | — | Required |
name | string | — | Required |
security | Security | — | Optional |
ObjectRef
Appears in: ConsumerSpec, ConsumeRouteSpec, RouteSpec, RouteListenerSpec
ObjectRef is a reference to a Kubernetes object It is similar to types.NamespacedName but has the required json tags for serialization
| Field | Type | Default | Validation |
|---|---|---|---|
name | string | — | Required |
namespace | string | — | Required |
uid | string | — | 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
| Field | Type | Default | Validation |
|---|---|---|---|
ipRestrictions | IpRestrictions | — | Optional |
IpRestrictions
Appears in: Security
| Field | Type | Default | Validation |
|---|---|---|---|
allow | string[] | — | Optional |
deny | string[] | — | Optional |
ConsumerStatus
Appears in: Consumer
ConsumerStatus defines the observed state of Consumer
| Field | Type | Default | Validation |
|---|---|---|---|
conditions | Condition[] | — | Optional |
lastAppliedChanges | LastAppliedChanges | — | Optional |
migration | Migration | — | Optional |
properties | map<string, string> | — | Optional |
Condition
Appears in: ConsumerStatus, ConsumeRouteStatus, GatewayStatus, RouteStatus
| Field | Type | Default | Validation |
|---|---|---|---|
lastTransitionTime | string | — | Required, Format: date-time |
message | string | — | Required, maxLength: 32768 |
observedGeneration | integer | — | Optional, Format: int64, minimum: 0 |
reason | string | — | Required, minLength: 1, maxLength: 1024, pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ |
status | string | — | Required, Enum: True \| False \| Unknown |
type | string | — | 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])$ |
LastAppliedChanges
Appears in: ConsumerStatus, RouteStatus
LastAppliedChanges records the last Kong change that was written.
| Field | Type | Default | Validation |
|---|---|---|---|
appliedAt | string | — | Required, Format: date-time |
approvedHash | string | — | Optional |
changes | Change[] | — | Optional |
decision | string | — | Required |
generation | integer | — | Required, Format: int64 |
hash | string | — | Required |
mode | string | — | Required |
truncated | boolean | — | Optional |
Change
Appears in: LastAppliedChanges, Migration
Changes are the backend entities the change created, updated or deleted.
| Field | Type | Default | Validation |
|---|---|---|---|
diffs | Diff[] | — | Optional |
id | string | — | Optional |
kind | string | — | Required |
name | string | — | Required |
operation | string | — | Required |
parents | map<string, string> | — | Optional |
Diff
Appears in: Change
Diffs are the differences between the desired and the current entity.
| Field | Type | Default | Validation |
|---|---|---|---|
current | string | — | Optional |
desired | string | — | Optional |
ignored | boolean | — | Optional |
path | string | — | Required |
Migration
Appears in: ConsumerStatus, RouteStatus
Migration is the pending Kong change that Migration Mode blocked. It is set only while the change is blocked.
| Field | Type | Default | Validation |
|---|---|---|---|
changes | Change[] | — | Optional |
hash | string | — | Required |
mode | string | — | Required |
truncated | boolean | — | Optional |
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
| Field | Type | Default | Validation |
|---|---|---|---|
consumerName | string | — | Required |
route | ObjectRef | — | Required |
security | ConsumeRouteSecurity | — | Optional |
traffic | Traffic | — | Optional |
ConsumeRouteSecurity
Appears in: ConsumeRouteSpec
| Field | Type | Default | Validation |
|---|---|---|---|
m2m | M2M | — | Optional |
M2M
Appears in: ConsumeRouteSecurity
M2M defines machine-to-machine authentication configuration
| Field | Type | Default | Validation |
|---|---|---|---|
basic | Basic | — | Optional |
client | Client | — | Optional |
grantType | string | — | Optional, Enum: client_credentials \| authorization_code \| password \| refresh_token |
scopes | string[] | — | Optional, maxItems: 100 |
tokenRequest | string | — | Optional, Enum: client_secret_basic \| client_secret_post |
Basic
Appears in: M2M, RouteM2M, ExternalIDP
Basic defines basic authentication configuration
| Field | Type | Default | Validation |
|---|---|---|---|
password | string | — | Required, minLength: 1 |
username | string | — | Required, minLength: 1 |
Client
Appears in: M2M, ExternalIDP
Client defines client credentials for OAuth2
| Field | Type | Default | Validation |
|---|---|---|---|
clientId | string | — | Required, minLength: 1 |
clientKey | string | — | Optional |
clientSecret | string | — | Optional |
refreshToken | string | — | Optional |
Traffic
Appears in: ConsumeRouteSpec
| Field | Type | Default | Validation |
|---|---|---|---|
rateLimit | RateLimit | — | Optional |
RateLimit
Appears in: Traffic
RateLimit defines the rate limit configuration for the ConsumeRoute
| Field | Type | Default | Validation |
|---|---|---|---|
limits | Limits | — | Required |
Limits
Appears in: RateLimit, RouteRateLimit
Limits defines the actual rate limit values for different time windows
| Field | Type | Default | Validation |
|---|---|---|---|
hour | integer | — | Optional, minimum: 0 |
minute | integer | — | Optional, minimum: 0 |
second | integer | — | Optional, minimum: 0 |
ConsumeRouteStatus
Appears in: ConsumeRoute
ConsumeRouteStatus defines the observed state of ConsumeRoute
| Field | Type | Default | Validation |
|---|---|---|---|
conditions | Condition[] | — | Optional |
properties | map<string, string> | — | Optional |
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
| Field | Type | Default | Validation |
|---|---|---|---|
admin | Admin | — | Required |
features | string[] | — | Optional |
namePrefix | string | — | Optional, maxLength: 63, pattern: ^[a-z0-9]+(-?[a-z0-9]+)*$ |
redis | Redis | — | Optional |
tls | Tls | — | Optional |
Admin
Appears in: GatewaySpec
| Field | Type | Default | Validation |
|---|---|---|---|
clientId | string | — | Required |
clientSecret | string | — | Required |
issuerUrl | string | — | Required |
url | string | — | Required |
Redis
Appears in: GatewaySpec
| Field | Type | Default | Validation |
|---|---|---|---|
enableTLS | boolean | — | Required |
host | string | — | Required |
password | string | — | Required |
port | integer | — | Required |
Tls
Appears in: GatewaySpec
TLS configures additional CA certificates trusted for the admin API and token endpoint. The referenced ConfigMap must be in the namespace of the Gateway.
| Field | Type | Default | Validation |
|---|---|---|---|
configMapRef | ConfigMapRef | — | Required |
ConfigMapRef
Appears in: Tls
ConfigMapRef references the PEM encoded CA certificates.
| Field | Type | Default | Validation |
|---|---|---|---|
key | string | — | Required, minLength: 1, maxLength: 253, pattern: ^[-._a-zA-Z0-9]+$ |
name | string | — | Required, minLength: 1, maxLength: 253, pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ |
GatewayStatus
Appears in: Gateway, RouteListener
GatewayStatus defines the observed state of Gateway
| Field | Type | Default | Validation |
|---|---|---|---|
conditions | Condition[] | — | 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
| Field | Type | Default | Validation |
|---|---|---|---|
additionalTags | string[] | — | Optional |
backend | Backend | — | Required |
buffering | Buffering | — | Optional |
gatewayRef | ObjectRef | — | Required |
hostnames | string[] | — | Optional, minItems: 0, maxItems: 20 |
passThrough | boolean | false | Required |
paths | string[] | / | Optional, minItems: 1, maxItems: 10 |
security | RouteSecurity | — | Optional |
traffic | RouteTraffic | — | Required |
transformation | Transformation | — | Optional |
type | string | primary | Required, Enum: primary \| secondary \| proxy |
Backend
Appears in: RouteSpec
Backend specifies the upstream targets to which the route forwards requests.
| Field | Type | Default | Validation |
|---|---|---|---|
upstreams | Upstreams[] | — | 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.
| Field | Type | Default | Validation |
|---|---|---|---|
hostname | string | — | Required |
path | string | — | Required |
port | integer | — | Required, Format: int32 |
scheme | string | — | Required |
weight | integer | — | Optional, Format: int32 |
Buffering
Appears in: RouteSpec
Buffering configures Kong request/response body buffering for this route
| Field | Type | Default | Validation |
|---|---|---|---|
disableRequestBuffering | boolean | false | Optional |
disableResponseBuffering | boolean | false | Optional |
RouteSecurity
Appears in: RouteSpec, Failover
Security is the security configuration for the route
| Field | Type | Default | Validation |
|---|---|---|---|
defaultConsumers | string[] | — | Optional |
disableAccessControl | boolean | false | Optional |
m2m | RouteM2M | — | Optional |
realmName | string | — | Required |
trustedIssuers | string[] | — | Optional, minItems: 0 |
RouteM2M
Appears in: RouteSecurity
M2M defines machine-to-machine authentication configuration
| Field | Type | Default | Validation |
|---|---|---|---|
basic | Basic | — | Optional |
claims | Claims[] | — | Optional |
externalIDP | ExternalIDP | — | Optional |
scopes | string[] | — | Optional, maxItems: 100 |
Claims
Appears in: RouteM2M
Claims defines token claims applied to all consumers (the "default" bucket)
| Field | Type | Default | Validation |
|---|---|---|---|
key | string | — | Required, Enum: aud |
value | string | — | Optional, minLength: 1, maxLength: 256 |
valueFrom | string | — | Optional, Enum: ConsumerClientId |
ExternalIDP
Appears in: RouteM2M
ExternalIDP defines external identity provider configuration
| Field | Type | Default | Validation |
|---|---|---|---|
basic | Basic | — | Optional |
client | Client | — | Optional |
grantType | string | — | Required, Enum: client_credentials \| authorization_code \| password \| refresh_token |
tokenEndpoint | string | — | Required, Format: uri |
tokenRequest | string | — | Required, Enum: client_secret_basic \| client_secret_post |
RouteTraffic
Appears in: RouteSpec
Traffic defines the traffic configuration for this route.
| Field | Type | Default | Validation |
|---|---|---|---|
circuitBreaker | CircuitBreaker | — | Optional |
dynamicUpstream | DynamicUpstream | — | Optional |
failover | Failover | — | Optional |
healthProbe | boolean | — | Optional |
rateLimit | RouteRateLimit | — | Optional |
CircuitBreaker
Appears in: RouteTraffic
| Field | Type | Default | Validation |
|---|---|---|---|
enabled | boolean | — | 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.
| Field | Type | Default | Validation |
|---|---|---|---|
queryParameter | string | — | Required, minLength: 1, pattern: ^[a-zA-Z0-9_-]+$ |
Failover
Appears in: RouteTraffic
| Field | Type | Default | Validation |
|---|---|---|---|
security | RouteSecurity | — | Optional |
targetZoneName | string | — | Required |
targets | Target[] | — | Required |
Target
Appears in: Failover
| Field | Type | Default | Validation |
|---|---|---|---|
hostname | string | — | Required |
path | string | — | Required |
port | integer | — | Required, Format: int32 |
scheme | string | — | Required |
weight | integer | — | Optional, Format: int32 |
zoneName | string | — | Optional |
RouteRateLimit
Appears in: RouteTraffic
RateLimit defines rate limits for different time windows
| Field | Type | Default | Validation |
|---|---|---|---|
limits | Limits | — | Required |
options | Options | — | Optional |
Options
Appears in: RouteRateLimit
Options defines additional configuration options for rate limiting
| Field | Type | Default | Validation |
|---|---|---|---|
faultTolerant | boolean | true | Optional |
hideClientHeaders | boolean | false | Optional |
Transformation
Appears in: RouteSpec
Transformation defines optional request/response transformations for this API
| Field | Type | Default | Validation |
|---|---|---|---|
request | Request | — | Optional |
Request
Appears in: Transformation
Request defines transformations applied to incoming API requests
| Field | Type | Default | Validation |
|---|---|---|---|
headers | Headers | — | Optional |
Headers
Appears in: Request
Headers defines HTTP header modifications for requests
| Field | Type | Default | Validation |
|---|---|---|---|
add | string[] | — | Optional, minItems: 1, maxItems: 5 |
remove | string[] | — | Optional, minItems: 1, maxItems: 5 |
RouteStatus
Appears in: Route
status defines the observed state of Route
| Field | Type | Default | Validation |
|---|---|---|---|
conditions | Condition[] | — | Optional |
consumers | string[] | — | Optional |
lastAppliedChanges | LastAppliedChanges | — | Optional |
migration | Migration | — | Optional |
properties | map<string, string> | — | Optional |
RouteListener
RouteListener is the Schema for the routelisteners API
Group: gateway.cp.ei.telekom.de · Version: v1 · Scope: Namespaced
RouteListenerSpec
Appears in: RouteListener
RouteListenerSpec defines the desired state of RouteListener. RouteListener enables API traffic capture on a gateway Route for a specific consumer.
| Field | Type | Default | Validation |
|---|---|---|---|
consumer | string | — | Required |
gatewayClient | GatewayClient | — | Required |
issue | string | — | Required |
route | ObjectRef | — | Required |
serviceOwner | string | — | Required |
zone | ObjectRef | — | Required |
GatewayClient
Appears in: RouteListenerSpec
GatewayClient credentials the jumper uses to mint the publisher token.
| Field | Type | Default | Validation |
|---|---|---|---|
clientId | string | — | Required |
clientSecret | string | — | Optional |
issuer | string | — | Required |
Admin Connection Trust
Gateway.spec.tls.configMapRef optionally references CA certificates in a ConfigMap in the Gateway's namespace. The Route and Consumer handlers use these certificates, in addition to system roots, for both the Kong admin API and OAuth token requests. This does not configure upstream TLS or change Gateway readiness into a connectivity check.
One injected client factory is shared by both controllers. Acquisitions validate the cached ConfigMap value before looking up a client, are isolated by Gateway identity and connection version, and return a lease released after the operation, including deletion. Invalid or missing trust blocks the Route or Consumer; a previously cached client is not a fallback.
See standalone examples and Outbound TLS Clients for rotation, error semantics, and factory lifecycle.
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.
| Source | Known at configuration time? | Resolved by | Result |
|---|---|---|---|
| Fixed value | Yes | The user | The literal value is used as-is. |
| Provider identifier | Yes — always the exposing application | Control Plane | Filled in as a literal value. |
| Base path | Yes | Control Plane | Filled in as a literal value. |
| Consumer identifier | No — differs for every consumer | Request-time token service | Left 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.
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.
| Type | Lives in | Sends traffic to | Purpose |
|---|---|---|---|
| Primary | The provider's zone | The provider's backend upstreams directly | The single egress point for an API. Every other route ultimately targets it. |
| Proxy | A 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. |
| Secondary | A provider failover zone | The 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.
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.
Kong entity naming and realms
Several virtual environments, for example bond, cit2 and cit4, can share one Kong. If Kong entities are named only after Route.metadata.name, the same Route name in two environments maps to the same Kong route, service and upstream, and the environments overwrite each other.
The optional field Gateway.spec.namePrefix keeps them apart by putting the realm in front of every Kong name (ADR-0003). It applies to every Route on the Gateway; Routes have no prefix field of their own. The Admin operator sets it to the realm name of the environment when it creates or updates the Gateway. If the feature flag FEATURE_LEGACY_GATEWAY_NAMING_ENABLED is true (default false), Gateways of the realm default get no prefix, so their Kong entities keep the names metadata.name; a prefix that is already set is kept.
namePrefix | Kong name of route, service and circuit-breaker upstream | Example |
|---|---|---|
| set | <namePrefix>--<metadata.name> | bond--eni-echo-v3, default--ai-gateway--mcp-v1 |
| empty | metadata.name: names, lookups and tags as before | eni-echo-v3 |
The prefix may contain lowercase letters, digits and single hyphens, up to 63 characters. Once set, it can be changed but not removed or emptied; a validation rule on the Gateway rejects that. It is unrelated to the Route's spec.security.realmName, which controls the Last-Mile-Security realm.
The Route handler copies the Gateway's prefix onto the Route in memory before every reconcile and delete. When the prefix of a Gateway changes, the Route controller reconciles all Routes that reference it. Every Route on the Gateway is renamed, including identity, zone-health and Admin managed routes.
The same applies to the other Gateway fields the Routes are built from: a change of spec.redis, such as a rotated Redis password of the rate-limiting plugins, or of spec.features also reconciles all Routes of the Gateway, so it reaches Kong without waiting for the periodic reconcile. A change of spec.admin or spec.tls only configures the connection to Kong and reconciles no Route.
One Gateway can serve several presets. API and AI Routes then share the prefix, and their names stay apart through the agentic ai-gateway-- name:
Route on Gateway aws-standard (prefix cit2) | Kong name | Legacy name adopted |
|---|---|---|
eni-foo-v1 (API) | cit2--eni-foo-v1 | cit2.eni-foo-v1 |
ai-gateway--mcp-v1 (AI) | cit2--ai-gateway--mcp-v1 | cit2-ai.ai-gateway--mcp-v1 |
dp1-standard--zone-health (Admin) | cit2--dp1-standard--zone-health | – (found by its CP tags) |
Names and tags
For a Route R in environment E with namePrefix P:
| Kong entity | Name | Tags |
|---|---|---|
| Route | P--R | env--E, route--R, realm--P, additional tags, kept ei__telekom__de--* tags |
| Service | P--R | env--E, route--R, realm--P, kept ei__telekom__de--* tags |
| Upstream (circuit breaker) | P--R | env--E, upstream--P--R, route--R, realm--P |
| Target (circuit breaker) | – | env--E, targets--P--R, route--R, realm--P |
| Route-bound plugins | – | ownership tags, realm--P |
route--Rkeepsmetadata.name, so ownership checks work the same with and without a prefix.realm--Pis informational. It is never used to prove ownership.- With a circuit breaker, the service host is the upstream name
P--R. ei__telekom__de--*tags are written by the legacy operator. They are kept on adopted entities, never added or removed.
Status properties
The Gateway operator records the Kong names and IDs of a Route in status.properties:
| Key | Value |
|---|---|
routeName | Kong name of the route and service. Written for every Route, also without a prefix. |
namePrefix | The Gateway's prefix used in this reconcile. Only when set. |
routeId | Kong route ID. |
serviceId | Kong service ID. |
upstreamId | Kong upstream ID, only with a circuit breaker. |
targetsId | Kong target ID, only with a circuit breaker. |
legacyName | The name the route had before it was renamed: metadata.name or a legacy name. Kept after adoption. |
Plugin IDs, such as kongRateLimitingPluginId, are stored here as well (see Plugin IDs and Kubernetes status).
The properties are rebuilt in every reconcile. The stored IDs are read first, so the Kong client can find the entities by ID. After a successful reconcile only the properties written in it remain, so the IDs of plugins and upstreams that are no longer used disappear. A failed reconcile keeps the previous properties and updates those written so far.
Reconciling a Route with a prefix
Route, service and circuit-breaker upstream are all looked up before anything is written, and then written by their Kong ID. A rename never creates a second entity, and a blocked lookup leaves Kong unchanged. The circuit-breaker feature only hands the upstream to write or to remove to the Kong client; the client writes the upstream before the service and deletes a removed upstream after the service no longer points to it.
Writes happen only when Kong differs from the desired state. How existing entities are found, adopted from earlier names and deleted is described in Gateway: Migrating Kong Entities.
A changed namePrefix is followed through the stored ID or the env--/route-- tags. A removed prefix is not: without a prefix, the operator looks up only metadata.name and never finds the entities named P--R. The Gateway CRD therefore rejects removing or emptying a set prefix, and the Admin operator keeps an existing prefix of the default realm when legacy gateway naming is turned on later. For the same reason, a Route built with a prefix (status property namePrefix) is Blocked if its gatewayRef changes to a Gateway without one; deleting it still uses the recorded prefix.
Only the Admin operator sets the prefix, on the Gateway. The Event operator names its Routes after the legacy-compatible base names; the API and Agentic operators are unchanged. See Scope and limitations.
Kong plugin ownership
Every Kong plugin the Gateway operator manages is identified by a set of ownership tags: env--<environment>, plugin--<name>, route--<route> for route-bound plugins and consumer--<consumer> (or consumer--none when no consumer is bound). The route-- tag always holds metadata.name, also for a Route on a Gateway with a namePrefix. These tags allow the operator to rediscover a plugin even when its Kong ID is not available in Kubernetes status.
Route-bound plugins of a Route on a Gateway with a namePrefix also carry realm--<namePrefix>. This tag does not count as an ownership tag.
Route binding
Route-bound plugins are bound to their Kong route by route ID, the routeId written earlier in the same reconcile. This applies to every Route, with or without a prefix, and includes the combined route-and-consumer rate-limiting plugin. A plugin falls back to the route name only if no route ID is known.
Lookup order
For a plugin bound to a route, a consumer or both, the operator first resolves the Kong IDs of the route (by its route ID) and of the consumer. A missing route or consumer is an error. It then looks the plugin up:
- Stored ID — the ID from the status, if available. A
404falls through; any other error stops reconciliation. The plugin must have the expected plugin name, no service binding and exactly the expected ownership tags, or be a legacy plugin in its slot as described in step 3. A plugin owned by something else is an error, never a reason to create another plugin. - Ownership tags — a complete, paginated list of plugins with the expected tags. Candidates with the expected plugin name must have no service binding and exactly the expected ownership tags; conflicting ownership or more than one match is an error. Unrelated tags are allowed. When the full ownership tags prove ownership, the operator repairs drifted route or consumer bindings in place rather than rejecting the plugin.
- Slot — route-bound plugins only. The operator reads all pages of
GET /routes/{routeId}/pluginsand takes the plugin in the same slot: same name, no service binding and the same consumer binding, or none. Kong allows only one plugin per slot.- If it carries any
ei__telekom__de--realm---*tag, and any ownership tags it already has are a subset of the expected ones, it is adopted under its existing ID. - Any other occupant is a
BlockedError.
- If it carries any
If no step finds a plugin, the operator creates a new one under a new ID. New plugins never receive legacy tags. Consumer-only and global plugins use only the stored ID and the ownership tags.
The slot lookup replaces the former fixed legacy tag ei__telekom__de--realm---default. It adopts plugins of every legacy realm, for every Route with or without a namePrefix.
Stop the legacy operator before the Gateway operator takes over the same Kong resources. This describes the implementation, not a confirmed live migration or proof of preserved IDs in a deployed environment.
Updates keep the plugin ID
An existing route- or consumer-bound plugin is always updated in place under its Kong ID, never deleted and recreated. The update:
- keeps every tag the plugin already carries and adds missing ownership tags, so an adopted legacy plugin keeps its legacy tags (routes and services, in contrast, keep only their
ei__telekom__de--*tags); - replaces the current configuration with the calculated desired configuration and sets the desired route and consumer bindings;
- keeps the plugin's
protocolsandinstance_name, including for plugins the operator created itself. Out-of-band changes to these fields are therefore not reverted.
Configuration is not deep-merged with the existing plugin, and there is no separate reset policy for omitted fields. The comparison remains default-tolerant: narrowToDesired compares only keys present in the desired configuration, including nested keys, so extra values returned by Kong do not alone trigger a write. This comparison does not preserve those extra values in an update. Even a write triggered only by missing ownership tags sends the calculated configuration, not a tags-only patch.
No Kong write is needed when the effective desired state already matches, including configuration, bindings, tags and enabled state. Newly created plugins use the desired settings, including protocols: [http] and no explicit instance_name. Global plugins also use the desired settings directly; the preservation of existing tags, protocols and instance name applies only to existing route- or consumer-bound plugins.
Plugin IDs and Kubernetes status
After discovering or writing a plugin, the Kong client passes its ID back to the plugin object, even when no Kong write was needed. Route-wide and consumer-only plugin IDs are persisted through their owning Route or Consumer controller's normal status update. On a Route, they are part of the property rebuild: the ID of a plugin that is no longer used disappears after a successful reconcile, and a failed reconcile keeps the previous IDs.
Combined route-and-consumer rate limiting is configured during Route reconciliation. Its kongRateLimitingPluginId is set only on the in-memory ConsumeRoute object; the Route handler does not persist that object's status, and the Route property rebuild does not change this. On a later reconciliation without a stored ID, the ownership tags rediscover the same Kong plugin and allow updates under the same ID. This is an existing persistence gap whose resolution is deferred. There is no cross-controller status writer or patch helper for this ID, and no additional watch for its persistence; the existing ConsumeRoute-to-Route watch remains in place.
Cleanup
After configuring a Route or Consumer, the operator deletes plugins it no longer needs. Cleanup uses only ownership tags, never legacy tags or the slot. For a Route, the route is resolved by its Kong route ID from the status; the list still filters by route--<metadata.name>. It reads all pages matching the current environment and route or consumer tags and classifies the candidates before deleting anything. Missing desired plugin IDs or a list or classification error stop cleanup before deletion. Only plugins whose tags and actual bindings prove ownership are eligible: no service binding, exactly one distinct env-- value for the current environment, exactly one distinct plugin-- value matching the plugin name, and
- for a route: exactly one distinct
route--value and the route binding of this route, and exactly one distinct consumer value: eitherconsumer--nonewithout a consumer binding or aconsumer--tag that resolves to the bound consumer; - for a consumer: exactly one distinct
consumer--value and the consumer binding of this consumer, and no route tag or binding. Consumer cleanup therefore never deletes combined route-and-consumer plugins; those belong to route cleanup.
Plugins without this proof, including legacy plugins that were never adopted, are skipped. Deleting a Route or Consumer in Kong still deletes all plugins bound to it, including adopted legacy plugins.
Consumer changes across zones
A cross-zone subscriber's ConsumeRoute references the proxy Route in the subscriber's zone. The JumperConfig with the subscriber's credentials, however, is built by the primary Route in the provider's zone and by failover secondary Routes. These Routes read all ConsumeRoutes with the same route name.
When a ConsumeRoute is created, changed or deleted, the Route controller therefore reconciles:
- the Route the ConsumeRoute references, and
- all primary and failover secondary Routes with the same name in the ConsumeRoute's environment.
Other proxy Routes with that name are not reconciled, because they only list their own consumers. Routes of other environments are never reconciled. A changed subscriber credential, such as a rotated client secret, reaches the provider zone's JumperConfig without waiting for the periodic resync.
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.
- Spectre domain — Creates RouteListener resources that expose listener endpoints on the gateway.
- Rover domain — Configures rate limiting and load balancing via traffic management settings.