Comments (4)
Hello @gerbil
It's working as expected because the scaling to 5 is happening, as we can see here:
2024-05-15T10:33:11Z INFO scaleexecutor Successfully set ScaleTarget replicas count to ScaledObject minReplicaCount {"scaledobject.Name": "backend", "scaledObject.Namespace": "ivp-test", "scaleTarget.Name": "backend", "Original Replicas Count": 5, "New Replicas Count": 0}
KEDA is scaling from 0 to 1 because KEDA relies on the HPA to scaling from 1 to N, so the "usual" process is that KEDA scales from 0 to 1 when there is at least 1 active trigger, and then the HPA scales the workload from 1 to N. desiredReplicas
is the value that the trigger will return to the HPA Controller. In the same way as with other scalers, if your queue returns 50, KEDA won't scale from 0 to 50 directly.
This is explained here: https://keda.sh/docs/2.14/concepts/scaling-deployments/#activating-and-scaling-thresholds
Given this, if you want to scale from 0 to 5 directly, it's doable. You can use idleReplicaCount
option to allow scaling to 0 with min replicas 5, and then KEDA will scaling from 0 to 5 and from 5 to 0 without passing from 1 and the HPA:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: backend
namespace: test
spec:
minReplicaCount: 5
idleReplicaCount: 0
scaleTargetRef:
apiVersion: deployment.xxx.com/v1alpha1
kind: ApplicationDeployment
name: backend
triggers:
- metadata:
desiredReplicas: '5'
end: 30 * * * *
start: 0 * * * *
timezone: Europe/Riga
type: cron
from keda.
This is by design, I believe, but I still think we should kill it in favor of #3566 @kedacore/keda-maintainers
from keda.
What exactly is by design here? desiredReplicas
is a part of ScaledObject/triggers
spec and it's not working as expected.
from keda.
Related Issues (20)
- Event Hub - incorrect metrics values HOT 10
- Dynamic Pod Scaling Based on Request Count HOT 1
- External scaler connection errors ignored, the HPA is missing metrics HOT 4
- Github Runner Scaler doesn't trigger until all job environments are approved
- Report the use of components with vulnerabilities in keda HOT 1
- Getting " no matches for kind "TriggerAuthentication" in version "keda.k8s.io/v1alpha1" ensure CRDs are installed first" while spplying scaledobject for Keda HOT 3
- leaderelection.go:320] error retrieving resource lock keda/operator.keda.sh: invalid character ', after object key HOT 5
- minReplicaCount not applied on a trigger type: cron HOT 4
- GCP Stackdriver scaler doesn't work with centralized metrics scope project HOT 4
- Refactor Scalers with new declarative scaler config HOT 5
- After completing a task, the Pod consistently enters the CrashLoopBackOff state repeatedly with the same Pod. HOT 3
- Upgrade KEDA to use Debian 12 Distroless
- Add support for Cassandra TLS auth
- Scaler not being properly closed HOT 1
- Add Scaler that Read Metrics From Current Custom Metrics Adapter HOT 3
- Keda operator pod restarts because of objectScaler HOT 7
- cron-scaler scales higher than expected HOT 4
- Continuous HPA updates with CPU Utilization trigger HOT 3
- Add support for access token authentication to an Azure Postgres Flexible Server - Postgres scaler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keda.