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

Optional checks or targets #1019

Open
nicoche opened this issue Dec 30, 2024 · 1 comment
Open

Optional checks or targets #1019

nicoche opened this issue Dec 30, 2024 · 1 comment

Comments

@nicoche
Copy link

nicoche commented Dec 30, 2024

Hey!

Have you considered implementing optional checks or targets?

Here is an example:

  • I have a check Idle that will decide on scaling action when my workload has between 0 and 1 replicas
  • I have a check Active that will decide on scaling action when my workload has between 1 and x replicas

I don't want my check Idle to be even considered if I have, say, 5 replicas. I only want to make my ScaleIn / ScaleOut / ScaleNone decision based on the Active check when I have between 2 and x replicas.

I have been playing with group, but it is really difficult to build something that behaves like this, especially when you have more than 2 checks. I think that being able to enable/disable checks or targets based on some criteria would bring a lot of flexibility.

An example API could be:

check "target-value-check" {
  # ...
  evaluation_criterias { # No criteria means that the check is always evaluated
    criteria "count-allocations" { # Either min or max must be defined
      min = 2
      max = 10
    }

  strategy "target-value" {
    target    = 20
    threshold = 0.0001
  }
  # ...
}

What do you think? I'm happy to help implement this.

@nicoche nicoche changed the title Optional targets Optional checks or targets Dec 30, 2024
@nicoche
Copy link
Author

nicoche commented Dec 31, 2024

I've drafted a PR with a similar approach, but a simpler API: #1020

Let me know what you think

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