keda
keda copied to clipboard
Composed (Logical/Priority) Triggers
Proposal
I would like to suggest a new feature: composed (Logical/Priority) triggers.
Use-Case
I would like to be able to compose triggers or define a logic/priority between triggers.
Example: Scaling from 0 to 1<=n<=maxReplicas replicas on a fixed CRON schedule (On/Off) with n managed by the metric (kafka) trigger during the runtime window.
The current design only enables "OR" logic between triggers. I would like to specify an "AND" logic between triggers or a priority of evaluation between triggers. Check trigger 1, if true then check trigger 2.
Anything else?
Specification
- AND logic between triggers
- Alternatively, define priority triggers
- Probably most rigorous, creating a composed trigger class enabling the above two
Possible inspiration: Log4J2 rules and triggers for rotating files based on time and file size
hey @theauheral Could this be duplicated? https://github.com/kedacore/keda/issues/2614
Hello @JorTurFer,
Yes maybe. Different use cases but same technical implementation I suspect. I would say related but not identical.
I see "Combination of triggers can be used, either with an OR or AND fashion." which is similar yes. but I also suggest priorities and composability. I guess #2614 has two feature requests with the second one being similar. The example of Microsoft Azure autoscale has multiple rules but not composed rules.
You could definitely build the two feature requests in one.
Yes, you are right. I link this too because this is more related (https://github.com/kedacore/keda/issues/2440). Just to clarify this a bit, KEDA delegates the scaling to the HPA Controller so applying an AND or prioritize the metrics it's not possible. The only doable option is the creation of composite scaler IMO
Yeah, what we can do is to provide just one metric to HPA in this case and calculate the formula consisting of multiple triggers on KEDA side.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Keep-Alive
@tomkerkhove any update on this?