Skip to main content

KEDA

Purpose

KEDA provides autoscaling for Lumie workloads that scale on CPU or RabbitMQ queue depth. The platform layer installs the KEDA operator, while individual applications own their own ScaledObject manifests.

This page is a reference document for developers changing autoscaling triggers, trigger auth, or queue-depth scaling thresholds.

Source Paths

PathRole
lumie-infra/platform/keda/argocd.yamlArgo CD application for KEDA
lumie-infra/platform/keda/helm-values.yamlKEDA operator, metrics server, and webhook images and resources
lumie-infra/applications/lumie/backend/manifests/scaled-object.yamlBackend CPU autoscaling
lumie-infra/applications/lumie/frontend/manifests/scaled-object.yamlFrontend CPU autoscaling
lumie-infra/applications/lumie/worker/grading-svc/manifests/{scaled-object.yaml,trigger-auth.yaml}Grading queue-depth scaling and shared RabbitMQ trigger auth
lumie-infra/applications/lumie/worker/report-svc/manifests/scaled-object.yamlReport queue-depth scaling

Public Surface

SurfaceNamespaceNotes
KEDA operatorkeda-systemReconciles ScaledObject and TriggerAuthentication resources
Metrics API serverkeda-systemFeeds external metrics to HPA
Admission webhookskeda-systemValidate and mutate KEDA resources
ScaledObject CRsApp namespacesDefine the real autoscaling contracts

Runtime Flow

Active ScaledObjects

WorkloadNamespaceTriggerMinMaxSource
lumie-backendlumie-backendCPU utilization 7025applications/lumie/backend/manifests/scaled-object.yaml
lumie-frontendlumie-frontendCPU utilization 7025applications/lumie/frontend/manifests/scaled-object.yaml
grading-svclumie-workerRabbitMQ queue grading.omr-request, queue length 2048applications/lumie/worker/grading-svc/manifests/scaled-object.yaml
report-svclumie-workerRabbitMQ queue report.generation-request, queue length 4045applications/lumie/worker/report-svc/manifests/scaled-object.yaml

The backend ScaledObject also defines explicit scale-up stabilization so JVM warmup spikes do not immediately drive the workload to maximum replicas.

Queue Trigger Auth

The inspected Git-managed auth resource is:

kind: TriggerAuthentication
metadata:
name: rabbitmq-auth
spec:
secretTargetRef:
- parameter: host
name: rabbitmq-connection
key: host

Live cluster inspection on June 14, 2026 showed:

  • rabbitmq-auth exists in namespace lumie-worker;
  • its status lists both grading-svc and report-svc as consumers;
  • the referenced Secret rabbitmq-connection also exists in lumie-worker.

Ownership Boundaries

ResponsibilityOwner
KEDA controller installplatform/keda/**
Per-workload scaling thresholdsEach workload's ScaledObject manifest
RabbitMQ host credential used by queue triggersShared rabbitmq-auth plus rabbitmq-connection Secret in lumie-worker

Contract Drift

Inspected repo and live state do not line up perfectly:

SourceClaim
applications/lumie/worker/grading-svc/kustomization.yamlIncludes manifests/trigger-auth.yaml
applications/lumie/worker/report-svc/kustomization.yamlDoes not include its own TriggerAuthentication, even though report-svc references rabbitmq-auth
Live cluster on June 14, 2026rabbitmq-auth.status.scaledobjects includes both grading-svc and report-svc
Inspected repo treeNo Git-managed source for the lumie-worker/rabbitmq-connection Secret was found

Treat rabbitmq-auth as a shared queue-scaling dependency today, and do not assume the rabbitmq-connection Secret is fully declared in lumie-infra until its source is added or documented.

Verification

cd lumie-infra
rg -n "kind: ScaledObject|TriggerAuthentication|rabbitmq-auth|queueName|metricType: Utilization" \
platform/keda applications/lumie
kubectl get scaledobject,triggerauthentication -A
kubectl get triggerauthentication rabbitmq-auth -n lumie-worker -o yaml