From 7e7b7d414df117ac1bd7c580973d7cb501161264 Mon Sep 17 00:00:00 2001 From: sirius0xdev Date: Wed, 29 Apr 2026 04:14:46 +0000 Subject: [PATCH] fix: restrict KEDA scaling to /v1/(chat/)?completions paths only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch to HTTPScaledObject (matches a100 pattern) - Probes (/health, /v1/models) now ignored for scaling - Keeps fast polling (10s), quick cooldown (30s), 15min idle scale-to-0 Health/readiness/startup probes hit pod IP directly (bypass service), so never triggered scaling anyway — but paths ensure only inference traffic scales. --- .../gpus/base/keda-gpu-scaling/keda-vllm.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/infrastructure/gpus/base/keda-gpu-scaling/keda-vllm.yaml b/infrastructure/gpus/base/keda-gpu-scaling/keda-vllm.yaml index eee9d2e..1669e1c 100644 --- a/infrastructure/gpus/base/keda-gpu-scaling/keda-vllm.yaml +++ b/infrastructure/gpus/base/keda-gpu-scaling/keda-vllm.yaml @@ -1,17 +1,22 @@ -apiVersion: keda.sh/v1alpha1 -kind: ScaledObject +apiVersion: http.keda.sh/v1alpha1 +kind: HTTPScaledObject metadata: name: rtx6000-scaling namespace: customer1 spec: + hosts: + - rtx6000-brain-service.customer1.svc.cluster.local scaleTargetRef: name: rtx6000-brain-vllm kind: Deployment apiVersion: apps/v1 - hosts: - - rtx6000-brain-service.customer1.svc.cluster.local + service: rtx6000-brain-service + port: 8000 + paths: + - path: "^/v1/(chat/)?completions" replicas: min: 0 max: 1 - targetPendingRequests: 1 - scaledownPeriod: 900\n pollingInterval: 10\n cooldownPeriod: 30 + pollingInterval: 10 + cooldownPeriod: 30 + scaledownPeriod: 900