Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for gateway actuators is patchy #3246

Open
dsyer opened this issue Jan 31, 2024 · 0 comments
Open

Documentation for gateway actuators is patchy #3246

dsyer opened this issue Jan 31, 2024 · 0 comments

Comments

@dsyer
Copy link
Contributor

dsyer commented Jan 31, 2024

Here are some issues I found when trying to use the actuators to add and update routes:

  • You can't delete (or modify) routes that were added in the app. Only the ones that you added through the endpoint. This seems like a dumb restriction but it should at least be easy to discover (e.g. by sending back a 4xx with an error message response instead of a 2xx).
  • The example output from GET /route/{id} does not match the actual output from an app
  • There is no example input for a POST, and the format is completely different (empirically) to the example referred to in docs
  • If you POST onto an existing route it gets duplicated and then causes a 500 next time you do GET /routes

What worked for me was to delete a route and then add it back (instead of trying to edit), and the format that worked was somewhere in between the example in the user docs and the actual output from the GET:

$ curl -H "Content-Type: application/json" localhost:8080/actuator/gateway/routes/app-low -d '{"predicates":["Path=/app", "Weight=app,20"],"filters":["StripPrefix=1"],"uri":"http://app:9898"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants