toxiproxy
toxiproxy copied to clipboard
K8s support
Hi, I worked on using ToxyProxy with k8s. Basically it involves
- deploying ToxyProxy in k8s
- opening ports dynamically in k8s
Would you be interested by a PR?
Hey! Thanks for opening an issue. 😄
If you're referring to using Toxiproxy in production to serve production traffic, I'm of the opinion that we should not be encouraging this because Toxiproxy has not been designed to handle production traffic.
If you're using Toxiproxy with k8s in some kind of a test or staging environment, I'd love to understand more about what you're doing and the changes you're proposing.
yes second one: we have one single deployment model, which is based on k8s. We deploy systematically our microservices with k8s. The deployments can be QA deployment (run basic e2e tests) or perf env (perf test) or pre-prod/prod env. We don't want to have different deployment models and we can catch any integration issue asap. We plan also to run our resiliency tests against a k8s deployment. It means that we deploy toxyproxy in the k8s cluster to. The tests are run outside the cluster.
So I just modified toxyproxy (proxy.go) so that when a new proxy is created (REST POST), the port is also opened inside k8s (k8s service).
Additionally, I also came up with an helm chart to deploy toxyproxy in k8s. Does it make sense?
I'm still putting all the pieces together so nothing ready yet.
For me the trouble with using Toxiproxy in k8s is that it may not be the best tool for the job. For example, you'll have access to manipulate the nodes iptables and traffic control rules instead of using Toxiproxy.
I'm not convinced we'd be willing to accept changes like this upstream, unless of course there are some minor general purpose refactors that make your life a lot easier without being a negative or anyone else using the project.
I am however very interested in what you're doing. Once you've finished, writing up a small article / blog post showing off what you did would be amazing.
Playing with iptables is not as convenient as using toxiProxy to put in place for example an e2e resiliency test suite. I don't have the feeling that my changes are out of the scope of ToxiProxy... but may be I'm wrong :)
Let me put together something and we can even have a videoconf quickly so I can show you what I'm talking about...
2018-05-09 13:38 GMT-07:00 Jake Pittis [email protected]:
For me the trouble with using Toxiproxy in k8s is that it may not be the best tool for the job. For example, you'll have access to manipulate the nodes iptables and traffic control rules instead of using Toxiproxy.
I'm not convinced we'd be willing to accept changes like this upstream, unless of course there are some minor general purpose refactors that make your life a lot easier without being a negative or anyone else using the project.
I am however very interested in what you're doing. Once you've finished, writing up a small article / blog post showing off what you did would be amazing.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Shopify/toxiproxy/issues/213#issuecomment-387868233, or mute the thread https://github.com/notifications/unsubscribe-auth/ANXwfvj8x9om-mH6CjDTQrWmC6TMLUBjks5tw1POgaJpZM4T4ope .
Jake, I put together something to demonstrate how we can use toxiproxy with k8s... Would you be available for a quick review. It would be the easiest way to understand if it's something that would make sense as a contribution...
cheers Bruno
@marqub would you be interested in sharing the documentation?
@marqub would you be interested in sharing the documentation?
I didn't write down anything. I planned to write a short blog post and create a git repository but didn't take the time to do it. I can walk you through what I have and if you are interested we can discuss about the next steps. At least it will get me started.
@marqub i'm also interested in how you manage opening the port in the k8s service. I have just started using toxiproxy, and what I have done is create a deployment, then manually create a service with a list of the proxy ports.
A helm chart would be great too!
@caalberts @rmohta Here a story on Medium that details how we use ToxiProxy on K8s http://bit.ly/2EAXRYk
Hope it helps!
Looks great. Will give it a try