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, RouteListenerSpec

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

ConsumerStatus defines the observed state of Consumer

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

Condition​

Appears in: ConsumerStatus, ConsumeRouteStatus, 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])$

LastAppliedChanges​

Appears in: ConsumerStatus, RouteStatus

LastAppliedChanges records the last Kong change that was written.

FieldTypeDefaultValidation
appliedAtstring—Required, Format: date-time
approvedHashstring—Optional
changesChange[]—Optional
decisionstring—Required
generationinteger—Required, Format: int64
hashstring—Required
modestring—Required
truncatedboolean—Optional

Change​

Appears in: LastAppliedChanges, Migration

Changes are the backend entities the change created, updated or deleted.

FieldTypeDefaultValidation
diffsDiff[]—Optional
idstring—Optional
kindstring—Required
namestring—Required
operationstring—Required
parentsmap<string, string>—Optional

Diff​

Appears in: Change

Diffs are the differences between the desired and the current entity.

FieldTypeDefaultValidation
currentstring—Optional
desiredstring—Optional
ignoredboolean—Optional
pathstring—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.

FieldTypeDefaultValidation
changesChange[]—Optional
hashstring—Required
modestring—Required
truncatedboolean—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

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
grantTypestring—Optional, Enum: client_credentials \| authorization_code \| password \| refresh_token
scopesstring[]—Optional, maxItems: 100
tokenRequeststring—Optional, Enum: client_secret_basic \| client_secret_post

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

ConsumeRouteStatus​

Appears in: ConsumeRoute

ConsumeRouteStatus defines the observed state of ConsumeRoute

FieldTypeDefaultValidation
conditionsCondition[]—Optional
propertiesmap<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

FieldTypeDefaultValidation
adminAdmin—Required
featuresstring[]—Optional
namePrefixstring—Optional, maxLength: 63, pattern: ^[a-z0-9]+(-?[a-z0-9]+)*$
redisRedis—Optional
tlsTls—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

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.

FieldTypeDefaultValidation
configMapRefConfigMapRef—Required

ConfigMapRef​

Appears in: Tls

ConfigMapRef references the PEM encoded CA certificates.

FieldTypeDefaultValidation
keystring—Required, minLength: 1, maxLength: 253, pattern: ^[-._a-zA-Z0-9]+$
namestring—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

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 specifies the upstream targets to which the route forwards requests.

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
lastAppliedChangesLastAppliedChanges—Optional
migrationMigration—Optional
propertiesmap<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.

FieldTypeDefaultValidation
consumerstring—Required
gatewayClientGatewayClient—Required
issuestring—Required
routeObjectRef—Required
serviceOwnerstring—Required
zoneObjectRef—Required

GatewayClient​

Appears in: RouteListenerSpec

GatewayClient credentials the jumper uses to mint the publisher token.

FieldTypeDefaultValidation
clientIdstring—Required
clientSecretstring—Optional
issuerstring—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.

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.

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.

namePrefixKong name of route, service and circuit-breaker upstreamExample
set<namePrefix>--<metadata.name>bond--eni-echo-v3, default--ai-gateway--mcp-v1
emptymetadata.name: names, lookups and tags as beforeeni-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 nameLegacy name adopted
eni-foo-v1 (API)cit2--eni-foo-v1cit2.eni-foo-v1
ai-gateway--mcp-v1 (AI)cit2--ai-gateway--mcp-v1cit2-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 entityNameTags
RouteP--Renv--E, route--R, realm--P, additional tags, kept ei__telekom__de--* tags
ServiceP--Renv--E, route--R, realm--P, kept ei__telekom__de--* tags
Upstream (circuit breaker)P--Renv--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--R keeps metadata.name, so ownership checks work the same with and without a prefix.
  • realm--P is 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:

KeyValue
routeNameKong name of the route and service. Written for every Route, also without a prefix.
namePrefixThe Gateway's prefix used in this reconcile. Only when set.
routeIdKong route ID.
serviceIdKong service ID.
upstreamIdKong upstream ID, only with a circuit breaker.
targetsIdKong target ID, only with a circuit breaker.
legacyNameThe 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.

Removing a prefix is not supported

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.

info

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:

  1. Stored ID — the ID from the status, if available. A 404 falls 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.
  2. 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.
  3. Slot — route-bound plugins only. The operator reads all pages of GET /routes/{routeId}/plugins and 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 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.

Ownership handoff

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 protocols and instance_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: either consumer--none without a consumer binding or a consumer-- 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.