activationValue is used to tell whether the scaler is on, basically, with the given value 20 below:
- Deployment is scaled out from 0 to 1 if the queue length exceeds
20; - Conversely, deployment is scaled in from 1 to 0 if the queue length is equal to or less than
20.
However, with minReplicaCount value of 1, activationValue, will be ignored since a pod will be created right away, regardless of the queue length.
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: my-rabbitmq-consumer
minReplicaCount: 1
maxReplicaCount: 10
cooldownPeriod: 300
triggers:
- type: rabbitmq
metadata:
queueName: my-task-queue
activationValue: "20"
mode: QueueLength