keda
keda copied to clipboard
Disabling scaledown is ignored
Report
Kubernetes docs provide a means by which scaledowns can be disabled:
behavior:
scaleDown:
selectPolicy: Disabled
However, ScaledObject doesn't seem to support this:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: test-scaledobject
spec:
scaleTargetRef:
name: test-keda-deploy
pollingInterval: 30
cooldownPeriod: 0
#idleReplicaCount: 0
minReplicaCount: 0
maxReplicaCount: 1
advanced:
horizontalPodAutoScalerConfig:
behavior:
scaleDown:
selectPolicy: Disabled
Expected Behavior
The expected behavior is that a triggering event would scale up to 1 pod, but once that triggering event was removed from the queue, scaledown to 0 would be disabled.
Actual Behavior
When the event queue is empty, the selectPolicy: Disabled directive is ignored and the pod count is scaled down to 0.
Steps to Reproduce the Problem
Logs from KEDA operator
example
KEDA Version
2.7.1
Kubernetes Version
1.21
Platform
Microsoft Azure
Scaler Details
Azure Scaler Bus
Anything else?
No response
@zroubalik Is this a bug or doc bug?
I think that is a gap in the docs, the section horizontalPodAutoScalerConfig
is passed to the HPA but the scaling from 1 to 0 is done by the operator.
IMO, KEDA shouldn't take case about HPA custom behaviours because that it's responsibility from the HPA Controller.
I think the side question here is - Do we allow end-users to configure all advanced HPA settings or just a handful?
I'm not sure, but in this case the user problem is from 1 to 0 and the HPA doesn't work there, it's the operator itself. I mean, if the issue had been scaling in from 2 to 1, could be a bug in the parameters that we pass to HPA, but in this case, the operator doesn't respect that parameter because it's for the HPA. I'd say that the side question is more like, should KEDA parse HPA advanced configs and respect them if they apply also in 0-1-0?
We should improve docs, to clearly mention that this setting applies to 1<->N scaling. But we can definitely think about adding some of those capabilities to 0<->1 as well.
We should improve docs, to clearly mention that this setting applies to 1<->N scaling.
:100: and also if people can configure all advanced configuration options or not.
But we can definitely think about adding some of those capabilities to 0<->1 as well.
Sounds like a good idea; would you mind opening a feature request for this @zroubalik ?
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.
This issue has been automatically closed due to inactivity.