Open
Description
Expected Behaviour
This test verifies that Elasti correctly manages the paused state of a KEDA ScaledObject
using annotations, in response to scaling decisions.
We want to confirm that the Elasti controller:
- Automatically pauses the ScaledObject (
autoscaling.keda.sh/paused=true
) during scale-down. - Unpauses it (
paused=false
) when load is detected and scale-up is required. - Accurately sets the
autoscaling.keda.sh/paused-replicas
annotation to reflect the last known replica count.
Scenario
You don’t have to follow this rigidly—it’s just a starting point for planning:
-
Deploy an ElastiService
- Use
autoscaler.type = keda
- Ensure a valid, pre-created KEDA ScaledObject exists for the workload.
- Use
-
Trigger Scale-Down
-
Wait for the Elasti controller to patch:
autoscaling.keda.sh/paused: "true"
on the ScaledObject.
-
-
Trigger Scale-Up
-
Simulate traffic or metrics that would cause scaling.
-
Wait for the controller to update:
autoscaling.keda.sh/paused: "false"
-
-
Assertion
-
Confirm that the ScaledObject has an annotation:
autoscaling.keda.sh/paused-replicas: "<expected-replica-count>"
-