vllm-project / vllm-project/production-stack

bug: The VLLMRuntime controller fails on every reconciliation when running on a cluster that does not have KEDA installed

Open Beginner friendly
#981 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
2.6k
Forks
503
Avg merge
4d 17h
Merged PRs (30d)
8

Description

Describe the bug

The VLLMRuntime controller fails on every reconciliation when running on a cluster that does not have KEDA installed, even if no VLLMRuntime resource enables autoscaling. This makes the operator unusable on clusters without KEDA.

To Reproduce
Environment
  • vLLM Production Stack Operator
  • Cluster without KEDA (no keda.sh API group registered)
Steps to Reproduce
  1. Install the operator on a cluster without KEDA
  2. Create a VLLMRuntime resource without autoscalingConfig (or with autoscalingConfig.enabled: false)
  3. Observe the controller logs
Expected behavior

The VLLMRuntime reconciles successfully. Since autoscaling is not requested, the operator should not require KEDA to be present.

Additional context

Root cause:

In operator/internal/controller/vllmruntime_controller.go:360-370, when autoscalingConfig is nil or disabled, the else branch attempts to delete a ScaledObject as a cleanup measure:

https://github.com/vllm-project/production-stack/blob/9b78da7dd9df3652bea4cddaa31d9087497cebc8/operator/internal/controller/vllmruntime_controller.go#L360-L370

The guard !errors.IsNotFound(err) only catches the case where the ScaledObject resource does not exist (i.e., the keda.sh API group is registered, but no ScaledObject with that name is found). It does not catch the case where the keda.sh API group itself is not registered on the cluster. In that scenario, the API server returns a different error (e.g., "the server could not find the requested resource") that does not satisfy errors.IsNotFound(), causing the reconciliation to fail.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in operator/internal/controller/vllmruntime_controller.go around lines 360-370 and reproduce the reconciliation on a cluster without the keda.sh API group, using a VLLMRuntime with autoscaling omitted or disabled. Confirm the controller behavior for that scenario and verify that reconciliation succeeds without KEDA while autoscaling remains unrequested.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.