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

Add option to limit the number of targets in a PodDisruptor #250

Open
Tracked by #251
pablochacin opened this issue Jul 6, 2023 · 0 comments
Open
Tracked by #251

Add option to limit the number of targets in a PodDisruptor #250

pablochacin opened this issue Jul 6, 2023 · 0 comments
Labels
design proposal Requires a design document for discussion enhancement New feature or request

Comments

@pablochacin
Copy link
Collaborator

Presently, when creating a PodDisruptor, all pods that match the pod selector become targets of the subsequent fault injection(s).
However, there are cases in which it would be convenient to limit the fault injection to a subset of pods. For example

  • To simulate faulty instances in a deployment (typical of a canary release or rolling deployment)
  • To simulate an under-performing instance and validate if requests are correctly load-balanced

The initial idea, aligned with the design of the selector API could be to add a limit attribute to the pod selector, that allows defining a maximum number of pods to be selected. For example:

selector = {
    select: { labels: {...} }
    limit: 1
}

However, in some cases, a percentage of the pods could be more convenient (for example, when the number of replicas varies):

selector = {
    select: { labels: {...} }
    limit: '20%'
}

One open question in this proposal is how to limit the number of targets for a ServiceDisruptor, as it does not consider a selector.

Note: Having arguments that allow multiple types of values is not uncommon in Kubernetes (for example, disruptor budget) but this is not necessarily a requirement for the API, just an example of the concept.

@pablochacin pablochacin added enhancement New feature or request design proposal Requires a design document for discussion labels Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design proposal Requires a design document for discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant