-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add toxic-config
component to configure Toxiproxy instances with latency toxics
#14473
Conversation
started the job as gitpod-build-af-add-toxic-config-component.9 because the annotations in the pull request description changed |
f08d3a8
to
bcd739d
Compare
Thanks for the change. Why does this need to be configured in go code rather than a configuration file? I feel like I'm missing a piece here. |
Toxiproxy allows declarative configuration of proxies via a config file, but configuration of toxics has to be done dynamically while Toxiproxy is running. The ability to configure toxics via the config file is a requested feature (Shopify/toxiproxy#447), but currently unimplemented. I think this stems from our use of Toxiproxy in a way that falls slightly outside it's intended use case of automated tests; in that case the toxics are much more dynamic and are added/removed via tests. For our use case, we want to configure one toxic and then leave it in place forever, for which a config file is more suitable. FWIW, we do configure Toxiproxy with a it would be nice to have the latency toxic configured in there too, but that isn't possible. |
Longer term, we could make the change upstream to allow toxic configuration via config file. That would allow us to delete this |
@andrew-farries Thanks, that makes more sense now. |
Description
As part of #9198 we will run a Toxiproxy instance in the application cluster to allow us to simulate a high-latency connection to the Gitpod database. Installation and configuration of this Toxiproxy instance is done in some preceding PRs:
with-slow-database
annotation #14388slowDatabase
flag. #14423slowDatabase
flag #14430slowDatabase
flag #14437Toxiproxy allows declarative configuration of proxies via a config file, but configuration of toxics has to be done dynamically while Toxiproxy is running.
This PR adds a new component
toxic-config
, intended to run as a sidecar container in a Kubernetes pod alongside Toxiproxy, that configures a given proxy with a latency toxic.For example, with a Toxiproxy instance running on
localhost:8474
with a proxy calledmysql
configured:will configure the
mysql
proxy with a latency toxic withlatency
andjitter
set to the provided values.A later PR will run this process as a sidecar container in the Toxiproxy pod.
Related Issue(s)
Part of #9198
How to test
toxiproxy
service in the preview environment:toxic-config
against thetoxiproxy
instance:mysql
proxy now has alatency
toxic configured.Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide