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

invalidation of empty trigger list is not backward compatible #6265

Closed
joebowbeer opened this issue Oct 23, 2024 · 6 comments
Closed

invalidation of empty trigger list is not backward compatible #6265

joebowbeer opened this issue Oct 23, 2024 · 6 comments
Labels
stale All issues that are marked as stale due to inactivity

Comments

@joebowbeer
Copy link
Contributor

joebowbeer commented Oct 23, 2024

The recent rejection of empty trigger lists is not backward compatible:

#5524

See #5520 (comment)_

KEDA has supported empty trigger lists for years.

The 80% CPU utilization trigger is added implicitly. That is how HPA works, as described in KEDA documentation:

https://keda.sh/docs/2.15/reference/glossary/#hpa

By default, scales based on CPU/memory usage. KEDA uses HPA to scale Kubernetes clusters and deployments.

We have been relying on it.

I think the best of both worlds solution would be to make this validator optional.

@zroubalik
Copy link
Member

my 2c: I think that the original behaviour was a bug not a feature (empty triggers list). We never intended this TBH. I think that adding an option to disable this specific validation makes sense, because I understand your reasons.

@SpiritZhou
Copy link
Contributor

As an empty trigger configuration will be blocked, it is not reasonable for an empty trigger list to be exempted from this blocking. If an option is added, should it disable the validation for both empty trigger values and empty trigger lists? @zroubalik

@joebowbeer
Copy link
Contributor Author

joebowbeer commented Oct 24, 2024

It's only the invalidation of empty lists that I feel is a breaking change, and should at least be opt-out going forward.

An empty trigger list is not really empty, as the CPU scaler is added implicitly by HPA.

https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#horizontalpodautoscaler-v2-autoscaling

If not set, the default metric will be set to 80% average CPU utilization.

Our "idiom" of relying on an empty trigger list as a base kustomization is convenient because k8s does not support patching of items in a list. For that reason our kustomize base has an empty trigger list, and the kustomize overlays add their specific triggers. (Otherwise, e.g., if we explicitly added CPU in the base, there would be no way for an overlay to kustomize these.)

Admittedly, this implicit behavior can be confusing. In particular, adding any trigger will remove the implicit cpu trigger...

@zroubalik
Copy link
Member

Yeah, empty list - if by empty values is meant a trigger (type) defined without any content.

Admittedly, this implicit behavior can be confusing. In particular, adding any trigger will remove the implicit cpu trigger...

Yeah, this is one of the reasons I don't like this kind of hidden explicit behaviors :)

Copy link

stale bot commented Jan 5, 2025

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.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Jan 5, 2025
Copy link

stale bot commented Jan 14, 2025

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Jan 14, 2025
@github-project-automation github-project-automation bot moved this from To Triage to Ready To Ship in Roadmap - KEDA Core Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale All issues that are marked as stale due to inactivity
Projects
Status: Ready To Ship
Development

No branches or pull requests

3 participants