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

Implement grpc interface to disruptor agent #52

Open
pablochacin opened this issue Nov 17, 2022 · 0 comments
Open

Implement grpc interface to disruptor agent #52

pablochacin opened this issue Nov 17, 2022 · 0 comments

Comments

@pablochacin
Copy link
Collaborator

pablochacin commented Nov 17, 2022

Presently the communication between the xk6-disruptor extension and the xk6-disruptor-agent running in the target Pods is implemented by executing a CLI command in the agent's container. This approach has several important advantages:

  • Facilitates testing the agent without any client-side component as it can be invoked from the command line.
  • Does not require the agent to be accessible outside the Kubernetes cluster (exec command uses Kubernetes API server as a gateway)

However, it also has some important drawbacks:

  • Mapping the interface defined in the xk6-disruptor extension into the corresponding commands in the agent. This process is error prone and may create subtle errors as different expectations regarding default values for parameters.
  • Error handling is quite limited when compared with the rich error handling capabilities in grpc
  • It makes difficult to test the communication, the Kubernetes client does not provide a way for mocking the execution of commands
  • Some disruptions may drop the network connection to the target (e.g simulate node disconnection) causing the exec command to fail.

Even when the existing command line model will likely remain the default interface, it would be convenient to also implement this communication using grpc and use it when running tests inside the Kubernetes cluster, for example using the k6-operator or K6 Cloud.

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

1 participant