Scaling protection — maxConcurrentRuns

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go, kubernetes

Research direction

Start by reading ADR 0006 and locating the AgentRun controller reconciliation path in this repository. Trace how running and Pending AgentRuns are counted and how terminal transitions trigger reconciliation; issue #65 provides the cancellation context. Done means configurable global or per-namespace limits, FIFO queuing without rejection, and tests covering slot release and pending cancellation.

Written by the indexing model from the issue text.

Description

enhancement

Add a configurable limit on concurrent AgentRuns to prevent cluster resource exhaustion.

Design (per ADR 0006)

  • Configurable maxConcurrentRuns on the controller (global and/or per-namespace)
  • Runs beyond the limit remain in Pending phase until a slot opens (queue, not reject)
  • Kubernetes ResourceQuota remains the primary hard protection against resource exhaustion; maxConcurrentRuns provides a better UX (runs queue rather than fail)

Controller behavior

  • Before creating a Sandbox, the controller counts running AgentRuns
  • If at or above the limit, the run stays in Pending
  • When a running AgentRun reaches terminal state, the controller picks the next Pending run (FIFO)
  • Pending runs can still be cancelled (see #65)

Future

  • Kueue integration for sophisticated multi-tenant quota management (per-namespace, per-team, borrowing/preemption) is the long-term path if needed

References

Dominant language
Go
Stars
5
Forks
13
Avg merge
4d 2h
Merged PRs (30d)
27

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from konveyor/agentic-controller

All issues in konveyor/agentic-controller

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.