This record is a draft awaiting review. It may be incomplete or wrong; do not rely on it yet.
Legacy Kong entities are adopted in place
Context
When a Gateway gets a name prefix, its Routes' Kong entities need new names. Kong already holds them under older names: the legacy operator named them <realm>.<name>, and the Gateway operator used to name them <name>. Traffic flows through these entities, and consumers, plugins and metrics refer to their Kong IDs.
Before the prefix, environments with the same Route name shared one Kong entity and recorded the same ID. An old name or a stored ID therefore does not prove that an entity belongs to a Route.
Decision
The Gateway operator finds each existing entity and renames it in place, so its Kong ID stays the same. It only takes over an entity that belongs to the Route.
- The lookup tries a fixed order of candidates, from the stored ID to the legacy names. An entity tagged for another environment or Route is skipped.
- The legacy naming scheme is configuration, not code.
- Event Routes are named after their legacy base names, such as
horizon-events, so their entities are found.
The lookup order and the conflict rules are described in Migrating Kong entities.
Options considered
- Rename in place (chosen): references to the Kong IDs keep working, and traffic is never without a route.
- Create new entities and delete the old ones: new Kong IDs would break references, and a failed switch would leave traffic without a route.
- Block on an ID that another Route claims: these IDs are left over from before the prefix and would block the Route forever.
Consequences
- The legacy operator must stop writing a Route before the Gateway operator takes it over. A route it recreates later under its old name is not detected.
- Deleting a Route checks once more per service whether another route still uses it.