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

HorizontalPodAutoscaler.autoscaling is invalid: spec.behavior.scaleDown.stabilizationWindowSeconds: Invalid value: 18000: must be less than or equal to 3600 #4976

Closed
mnacharov opened this issue Sep 15, 2023 · 3 comments · Fixed by #4983
Assignees
Labels
bug Something isn't working

Comments

@mnacharov
Copy link

Report

ScaledObject with stabilizationWindowSeconds=18000 successfully applied but keda operator ignored it

Expected Behavior

ScaledObject with wrong configurations should not applied to kubernetes cluster, so user could see that something goes wrong right away

(we can simply add maximum field in CRD to do that)

Actual Behavior

I successfully created ScaledObject with stabilizationWindowSeconds equals to 18000 (5 hours)

But it turns out that HPA not created and scaling don't applied. keda operator showed this error:
2023-09-13T22:40:24Z ERROR Reconciler error {"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "ScaledObject": {"name":"my-deployment","namespace":"default"}, "namespace": "default", "name": "my-deployment", "reconcileID": "98155475-32e1-4000-a034-b8397ddd357a", "error": "HorizontalPodAutoscaler.autoscaling \"keda-hpa-my-chart\" is invalid: spec.behavior.scaleDown.stabilizationWindowSeconds: Invalid value: 18000: must be less than or equal to 3600"}

Steps to Reproduce the Problem

  1. create ScaledObject with stabilizationWindowSeconds=18000
  2. ❗ no HPA created
  3. ❗ errors in keda operator

Logs from KEDA operator

2023-09-13T22:40:24Z	ERROR	Reconciler error	{"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "ScaledObject": {"name":"my-deployment","namespace":"default"}, "namespace": "default", "name": "my-deployment", "reconcileID": "98155475-32e1-4000-a034-b8397ddd357a", "error": "HorizontalPodAutoscaler.autoscaling \"keda-hpa-my-chart\" is invalid: spec.behavior.scaleDown.stabilizationWindowSeconds: Invalid value: 18000: must be less than or equal to 3600"}

KEDA Version

2.11.2

Kubernetes Version

1.27

Platform

Google Cloud

Scaler Details

postgresql

Anything else?

No response

@mnacharov mnacharov added the bug Something isn't working label Sep 15, 2023
@JorTurFer
Copy link
Member

Hi,
Being honest, It's the first time that I have heard about that limitation, but we could add it. Would you be willing to contribute with the fix?
It can be done just adding the CRD validation: https://book.kubebuilder.io/reference/markers/crd-validation.html

@Indresh2410
Copy link
Contributor

@mnacharov / @JorTurFer I'm willing to work on the fix. Please let me know if I can proceed on the same

@JorTurFer
Copy link
Member

JorTurFer commented Sep 17, 2023

Sure, the stage is yours :)
I assign the issue to you, we appreciate the contributions 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants