Configure background worker scaling

Configure resource limits and autoscaling for the background worker pods that execute built-in workflows.

Before you begin

  • You have cluster administrator access to the OpenShift cluster running the automation orchestrator.
  • You have installed the automation orchestrator operator and have a running AutomationOrchestrator instance.

Procedure

  1. Open the AutomationOrchestrator custom resource (CR) for editing:
    $ oc edit automationorchestrator instance-name -n namespace
  2. Add or modify the spec.backgroundWorker section:
    spec:
      backgroundWorker:
        resources:
          requests:
            cpu: 250m
            memory: 256Mi
          limits:
            memory: 1Gi
        hpa:
          minReplicas: 2
          maxReplicas: 5
          targetCPUUtilization: 80
    • resources sets the CPU and memory requests and limits for each pod.
    • hpa.minReplicas sets the minimum number of background worker pods. The Horizontal Pod Autoscaler (HPA) manages replica count exclusively.
    • hpa.maxReplicas sets the maximum number of background worker pods the HPA scales to.
    • hpa.targetCPUUtilization sets the target CPU utilization percentage that triggers scaling. Defaults to 80 if omitted.
    Note

    Do not set spec.backgroundWorker.replicas directly. The operator ignores this field because the HPA manages replica count. Setting it emits a ReplicasIgnored warning event.

  3. Save the CR.

    The operator detects the change and performs a rolling update of the background worker deployment.

Results

Verify that the HPA reflects the values you configured:

$ oc get hpa instance-name-background-worker -n namespace

Confirm that MINPODS and MAXPODS match the hpa.minReplicas and hpa.maxReplicas values you configured.

Verify that the background worker pods are running:

$ oc get pods -n namespace -l app.kubernetes.io/component=background-worker