Legal Route Names

We were researching potential use of Kong hybrid mode, and ran into an issue with syncing config between control and data planes:

2020/07/31 14:34:34 [error] 107#0: *159 [lua] clustering.lua:182: unable to update running config: bad config received from control plane in ‘routes’:
in entry 1 of ‘routes’:
in ‘name’: invalid value ‘$(VALUE)’: it must only contain alphanumeric and ‘., -, _, ~’ characters

This is interesting, because we were simply trying to reuse existing config that has already been setup for an existing Kong instance (running standalone, not hybrid). As it turns out, we really do have a route named “$(VALUE)” due to a mistake in our terraform. But, if this name really is illegal, why did Kong allow this route to be added in the first place? There seems to be a discrepancy in validation of data that is added via the admin API vs. syncing between control/data planes. I would expect one of the following:

  1. If this name is not valid, Kong should not permit the route to be create via the admin API, or
  2. If this name is valid, the syncing control/data planes should not throw this error

Is there documentation that details requirements/restrictions for route names that would help determine what should have happened? Specifically, what characters are permitted? Do names need to be unique? Any other restrictions such as max length, etc.?


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ