Skip to content

feat: wire flow control policies and smart queue defaults#2232

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
LukeAVanDrie:feat/flow-control-policy-config
Jan 29, 2026
Merged

feat: wire flow control policies and smart queue defaults#2232
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
LukeAVanDrie:feat/flow-control-policy-config

Conversation

@LukeAVanDrie
Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature
/kind documentation
/kind cleanup

What this PR does / why we need it:

This PR builds upon #2217 by wiring up the policy plugins. It allows users to configure specific Fairness and Ordering policies (e.g., EDF, Round Robin) per Priority Band and ensures the underlying queue implementation supports the chosen policy's requirements.

Key Changes:

  1. API Extension:

    • Added FairnessPolicyRef and OrderingPolicyRef to PriorityBandConfig.
    • This enables users to reference specific named plugin instances for flow control logic.
  2. Queue Defaulting:

    • Implemented logic in the registry to inspect the selected Ordering Policy's capabilities.
    • Defaults to ListQueue (O(1)) for standard policies like FCFS.
    • Automatically upgrades to MaxMinHeap (O(log n)) if the policy requires heap capabilities (e.g., EDF).
  3. Plugin Architecture:

    • Refactored Flow Control plugins (ordering, fairness) to remove init() side-effects in favor of explicit in-tree factory registration in runner.go.
    • Updated config/loader to ensure system-default policy plugins (fcfs-ordering-policy, global-strict-fairness-policy) are automatically registered if not explicitly configured by the user.
  4. Documentation Overhaul:

    • Restructured the plugin configuration guide. Plugins are now grouped by category (Infrastructure, Scheduling, Flow Control) rather than a flat list, improving readability.
    • Added detailed documentation for the new Flow Control policy configuration fields.

Which issue(s) this PR fixes:

Does this PR introduce a user-facing change?:

Added `fairnessPolicyRef` and `orderingPolicyRef` to Flow Control `PriorityBandConfig`, allowing configuration composable policies (e.g., Earliest Deadline First, Round Robin).

Adds the `FlowControlConfig` API to the `EndpointPickerConfig` CRD and
wires it into the Flow Controller initialization path.

This change exposes critical operational knobs including:
- Global and Per-Band Capacity (`MaxBytes`)
- Safety Timeouts (`DefaultRequestTTL`)
- Memory Reclamation Tuning (`ExpiryCleanupInterval`)
Adds configuration fields for Fairness and Ordering policies to the
`PriorityBandConfig` API and implements intelligent queue selection
logic.

Key Changes:
- API: Added `FairnessPolicyRef` and `OrderingPolicyRef` to Priority
  Bands, allowing users to select specific policy plugins (e.g., EDF,
  RoundRobin).
- Registry: Implemented "Smart Defaulting" to automatically select
  `MaxMinHeap` when policies require priority capabilities (e.g., EDF),
  otherwise defaulting to the more performant `ListQueue` (O(1)).
- Loader: Updated the config loader to ensure system-default policy
  plugins (`fcfs`, `global-strict`) are registered if not explicitly
  configured by the user.
- Plugins: Refactored policy plugins to use explicit Factory
  registration and support named instances.
- Docs: Reorganized the Plugin Configuration guide by category
  (Infrastructure, Scheduling, Flow Control) for better readability and
  added content for the new config options.
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/documentation Categorizes issue or PR as related to documentation. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jan 28, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 28, 2026

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 393eba4
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/697a855a05db8f00086dc98f
😎 Deploy Preview https://deploy-preview-2232--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 28, 2026
@LukeAVanDrie
Copy link
Copy Markdown
Contributor Author

LukeAVanDrie commented Jan 28, 2026

/assign @kfswain

cc: @ahg-g (since you reviewed #2217)

With this PR, Flow Control configuration and extensibility is complete 🎊. It is now aligned with every other pluggable layer.

@LukeAVanDrie LukeAVanDrie changed the title Feat/flow control policy config feat: wire flow control policies and smart queue defaults Jan 28, 2026
@ahg-g
Copy link
Copy Markdown
Contributor

ahg-g commented Jan 29, 2026

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 29, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, LukeAVanDrie

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 29, 2026
@k8s-ci-robot k8s-ci-robot merged commit 08fc9b0 into kubernetes-sigs:main Jan 29, 2026
13 checks passed
elevran pushed a commit to llm-d/llm-d-inference-scheduler that referenced this pull request Apr 23, 2026
…-sigs/gateway-api-inference-extension#2232)

* feat: add FC configuration to EndpointPickerConfig

Adds the `FlowControlConfig` API to the `EndpointPickerConfig` CRD and
wires it into the Flow Controller initialization path.

This change exposes critical operational knobs including:
- Global and Per-Band Capacity (`MaxBytes`)
- Safety Timeouts (`DefaultRequestTTL`)
- Memory Reclamation Tuning (`ExpiryCleanupInterval`)

* feat: wire FC policies and enable queue defaulting

Adds configuration fields for Fairness and Ordering policies to the
`PriorityBandConfig` API and implements intelligent queue selection
logic.

Key Changes:
- API: Added `FairnessPolicyRef` and `OrderingPolicyRef` to Priority
  Bands, allowing users to select specific policy plugins (e.g., EDF,
  RoundRobin).
- Registry: Implemented "Smart Defaulting" to automatically select
  `MaxMinHeap` when policies require priority capabilities (e.g., EDF),
  otherwise defaulting to the more performant `ListQueue` (O(1)).
- Loader: Updated the config loader to ensure system-default policy
  plugins (`fcfs`, `global-strict`) are registered if not explicitly
  configured by the user.
- Plugins: Refactored policy plugins to use explicit Factory
  registration and support named instances.
- Docs: Reorganized the Plugin Configuration guide by category
  (Infrastructure, Scheduling, Flow Control) for better readability and
  added content for the new config options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

4 participants