Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel6
outlinefalse
stylenone
typelist
printabletrue

Overview

There has been a change in the way how Eureka manages routes in Kong.

The goal of the change is to reduce number of routes in Kong. This is achieved by making routes non-tenant-specific - thus avoiding duplication of same routes per tenant.

Since routes are now not tenant-specific, they can be created/deleted immediately when module discovery information is added/deleted - which is why the logic for managing Kong routes is now in mgr-applications microservice.

Previously routes were created/deleted in Kong on entitling/unentitling application for a specific tenant - and that is why logic for managing Kong routes was in mgr-tenant-entitlements microservice.

...

  • Jira Legacy
    serverSystem Jira
    serverId01505d01-b853-3c2e-90f1-ee9b165564fc
    keyMGRAPPS-35

  • Jira Legacy
    serverSystem Jira
    serverId01505d01-b853-3c2e-90f1-ee9b165564fc
    keyMGRENTITLE-81

Transition process

Prerequisites

Deploy mgr-applications version 2.0.0 or later.

Enable feature toggle in mgr-applications by setting configuration property routemanagement.enable to true, e.g. via environment variable ROUTEMANAGEMENT_ENABLE = true

Disable feature toggle in mgr-tenant entitpements -entitlements by setting configuration property application.kong.enabled to false, e.g. via environment variable APPLICATION_KONG_ENABLED = false

Steps

  • Enable Disable Kong routes management in mgr-tenant-applications entitlements via env variable ROUTEMANAGEMENTAPPLICATION_KONG_ENABLE ENABLED = truefalseDisable

  • Enable Kong routes management in mgr-tenant-entitlements applications via env variable APPLICATIONROUTEMANAGEMENT_KONG_ENABLED ENABLE = falsetrue

  • Get all module IDs from discovery information: {{am_url}}execute HTTP GET on <mgr-applications>/modules/discovery?limit=5000500, pick id field from discovery array entries, mind the possible pagination - get next pages if there are any.

  • Delete discovery information per module DELETE {{am_url}}: execute HTTP DELETE on <mgr-applications>/modules/<module-id>/discovery where module-id is a module id from previous step. Execute such HTTP request for all modules. Optionally: verify that Kong routes were deleted for these modules via Kong management UI.

  • Re-create discovery information POST {{am_url}}/modules/discovery: execute HTTP POST on <mgr-applications>/modules/discovery with a modules discovery information (can be the same as in GET step).

Verification

In Kong management UI, go to Gateway Services section, find some modules for which discovery information was just re-created, and check their routes - the expression section for route should NOT contain x_okapi_tenant header part. E.g. go to module details, open routes tab, open any route and check the expression field:

...