Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Unable to add a Route to a Service #258

Closed
jamelseagraves opened this issue Aug 14, 2018 · 3 comments
Closed

Unable to add a Route to a Service #258

jamelseagraves opened this issue Aug 14, 2018 · 3 comments

Comments

@jamelseagraves
Copy link

Hi Konga team,
First off. Kudos on a great interface! This has been a super useful tool in managing my Kong server.

I am running Kong and Konga in a Kubernetes cluster. I just updated to Kong 0.14.0 and Konga 0.12.0. I am trying out the Services/Routes feature for the first time. I was able to successfully create a new Service with no problem, but for some reason, I am unable to create a new Route on that Service.

Steps to reproduce:

  1. Add a new Service
  2. Select the Service and select Routes
  3. Add a new Route
  4. Populate the Hosts, Paths, and Methods fields (e.g. example.com; /api/v1; GET), and leave all other fields as default
  5. Click Submit Route

An error message appears, and when I checked the logs on the Docker container, this is what I saw:

8/14/2018 9:33:55 AMKongProxyController:entity services
8/14/2018 9:33:55 AMKongProxyHooks:afterEntityList called() services
8/14/2018 9:34:15 AMKongProxyController:req.method POST
8/14/2018 9:34:15 AMKongProxyController:req.url /routes/
8/14/2018 9:34:15 AMKongProxyController:entity routes
8/14/2018 9:34:15 AMKongProxyController request error { fields:
8/14/2018 9:34:15 AM   { '@entity':
8/14/2018 9:34:15 AM      [ 'at least one of these fields must be non-empty: \'methods\', \'hosts\', \'paths\'' ] },
8/14/2018 9:34:15 AM  name: 'schema violation',
8/14/2018 9:34:15 AM  code: 2,
8/14/2018 9:34:15 AM  message: 'schema violation (at least one of these fields must be non-empty: \'methods\', \'hosts\', \'paths\')' }

It seems there may be an issue with the schema validation for creating a new Route, unless I am missing something. For the time being, I am okay to keep using the deprecated APIs feature, but it would certainly be nice to migrate to the latest and greatest. 😄 Any help on this would be greatly appreciated!

@pantsel
Copy link
Owner

pantsel commented Aug 14, 2018

Hi James, try pressing enter after every method, host or path you type in the routes form. These are not text inputs but arrays visualized as chips

@jamelseagraves
Copy link
Author

@pantsel ahhh... Yes, I see now. I was still used to the old style of API form input. Thanks for the quick response!

@midacts
Copy link

midacts commented Jun 14, 2020

I ran into this as well.
Didn't know that i needed to hit "Enter" for it to work until seeing this.

thanks for https://medium.com/@tselentispanagis/managing-microservices-and-apis-with-kong-and-konga-7d14568bb59d btw

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants