skip to content
Alvin Lucillo

activationValue with non-zero min replica count

/ 1 min read

activationValue is used to tell whether the scaler is on, basically, with the given value 20 below:

  1. Deployment is scaled out from 0 to 1 if the queue length exceeds 20;
  2. 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