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

Consider using envoy route check tool #19

Open
howardjohn opened this issue Jul 4, 2020 · 6 comments
Open

Consider using envoy route check tool #19

howardjohn opened this issue Jul 4, 2020 · 6 comments

Comments

@howardjohn
Copy link

https://www.envoyproxy.io/docs/envoy/latest/install/tools/route_table_check_tool

It would be pretty interesting to directly use the envoy check tool mentioned above. That should allow much richer/lower maintenance test cases as you can cover all of Istio api surface.

I would imagine this looks like translating the istio config to envoy config then running through the envoy tool

@cainelli
Copy link
Collaborator

cainelli commented Jul 6, 2020

We have considered translating Istio config into Envoy but was afraid it wasn't fit into a hackday project as we wanted to delivery something concrete to add to our pipeline before applying the virtualservices.

This indeed looks a promising approach moving forward tho. Highly appreciate the input.

@howardjohn
Copy link
Author

I think the biggest problem is also the fact that the envoy tool is based on routes, so you need a way to translate the request from the test to which route will be used. Normally that is handled by listeners/filter chain matching - hopefully we would not re-implement that logic. The actual part of running the istio -> envoy offline isn't super clean but we are working on improving it. https://github.com/istio/istio/blob/bdac0787e932c747154e996cfb2aabef6c820b88/pilot/pkg/xds/bench_test.go#L58 is a good example of doing it (and other stuff, so its a bit messier)

@cainelli
Copy link
Collaborator

cainelli commented Jul 7, 2020

Thanks, this reference will be quite useful and already gives me a direction, I will get more familiar with the tool and codebase and try to come up with a proof of concept after my vacation. Do you think this would be valuable for upstream istioctl? like istioctl analyze today. I haven't look at the code/dependencies, etc. to see how much work would be, just something I thought.

@howardjohn
Copy link
Author

My main concern there is that it needs to call out to an external binary (the envoy tool). Might be easiest to ship it as a docker image of something that contains the go binary doing the logic and the envoy binary we call out to. That go binary may or may not be istioctl itself. Probably short term it would be it's own thing then possibly in the future it can be merged in

@cainelli
Copy link
Collaborator

cainelli commented Jul 7, 2020

yeah right, it makes sense. Let's start with that.

@cainelli
Copy link
Collaborator

An update on this old issue. I've built a prototype and we have been running internally in parallel with existing tooling.

To make it work with our existing tests I forked Istio proxy to build and patch the envoy router tool to work around runtime configuration issues. I've opened an issue envoyproxy/envoy#35174 to find a way forward without patching the tool.

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

No branches or pull requests

2 participants