skipper icon indicating copy to clipboard operation
skipper copied to clipboard

route validation

Open aryszka opened this issue 4 years ago • 2 comments

Invalid route configuration, e.g. a typo in a filter's name or invalid arguments are currently detected only in the last phase of the route updates, and it's not possible to reuse Skipper's code for route validation in external processes.

A validation mechanism that works with the in-memory eskip representation of the routes, and can be used in the data clients or in external processes. To make it really nice, the filter and predicate specifications could optionally implement an interface that can validate the arguments without creating the active run-time representation of the filters and predicates, and if possible also can be used to generate documentation. It is expected that, besides just failing early, such a mechanism would make it easier to provided more meaningful messages about route configuration problems.

If this feature is shipped, the routing package should be reviewed, and cleaned up for potentially duplicate functionality (e.g. informative messages: https://github.com/zalando/skipper/blob/master/routing/datasource.go#L220)

aryszka avatar Mar 04 '20 13:03 aryszka

Permalink: https://github.com/zalando/skipper/blob/0cc8c24b726a3f2da11594c86b125dead0c324c3/routing/datasource.go#L220-L222

ruudk avatar Mar 07 '20 13:03 ruudk

This was fixed via validation webhook, but we need to add documentation for this. I have some local start that I will push hopefully soon.

szuecs avatar Nov 13 '20 19:11 szuecs