Skip to content

feat: add model serving resource classes - #2778

Closed
threcc wants to merge 1 commit into
RedHatQE:mainfrom
threcc:feat/model-serving-resources
Closed

feat: add model serving resource classes#2778
threcc wants to merge 1 commit into
RedHatQE:mainfrom
threcc:feat/model-serving-resources

Conversation

@threcc

@threcc threcc commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Add auto-generated resource classes for RHOAI model serving component, generated from a cluster running RHOAI 3.5 GA.

New resources

  • HTTPRoute (gateway.networking.k8s.io)
  • InferencePool (inference.networking.k8s.io + inference.networking.x-k8s.io)
  • Kuadrant (kuadrant.io)
  • LocalModelNamespaceCache (serving.kserve.io)

Updated resources

  • LLMInferenceService — regenerated from 3.5 CRD, adds kv_cache_offloading, scaling, storage_initializer, tracing, spec_annotations, spec_labels
  • LLMInferenceServiceConfig — regenerated from 3.5 CRD, same new fields as above

Other changes

  • Added INFERENCE_NETWORKING_K8S_IO and INFERENCE_NETWORKING_X_K8S_IO API group constants to Resource.ApiGroup
  • Updated schema archive
  • Added test manifests and test entries for all new/updated resources

Supersedes #2744.

Ref: RHOAIENG-71449

Summary by CodeRabbit

  • New Features
    • Added support for Gateway API HTTP routes and inference networking pools.
    • Added resources for LLM inference services, local model caching, and Kuadrant configuration.
    • Added configuration options for model serving, scaling, routing, storage, tracing, observability, and security.
    • Added API group support for inference networking resources.
  • Bug Fixes
    • Improved resource serialization, validation, and handling of optional configuration fields.
  • Tests
    • Expanded coverage to include all newly supported resource types.

Signed-off-by: threcc <trecchiu@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f4f4132-de6e-4da9-bf45-596c4c1f2a40

📥 Commits

Reviewing files that changed from the base of the PR and between fe05210 and 5b1205d.

⛔ Files ignored due to path filters (1)
  • class_generator/schema/__resources-mappings.json.gz is excluded by !**/*.gz, !class_generator/schema/**
📒 Files selected for processing (16)
  • class_generator/tests/manifests/HTTPRoute/http_route.py
  • class_generator/tests/manifests/InferencePool/inference_pool_inference_networking_k8s_io.py
  • class_generator/tests/manifests/InferencePool/inference_pool_inference_networking_x_k8s_io.py
  • class_generator/tests/manifests/Kuadrant/kuadrant.py
  • class_generator/tests/manifests/LLMInferenceService/llm_inference_service.py
  • class_generator/tests/manifests/LLMInferenceServiceConfig/llm_inference_service_config.py
  • class_generator/tests/manifests/LocalModelNamespaceCache/local_model_namespace_cache.py
  • class_generator/tests/test_class_generator.py
  • ocp_resources/http_route.py
  • ocp_resources/inference_pool_inference_networking_k8s_io.py
  • ocp_resources/inference_pool_inference_networking_x_k8s_io.py
  • ocp_resources/kuadrant.py
  • ocp_resources/llm_inference_service.py
  • ocp_resources/llm_inference_service_config.py
  • ocp_resources/local_model_namespace_cache.py
  • ocp_resources/resource.py

Walkthrough

Adds six generated Kubernetes resource kinds, inference networking API-group constants, specification serialization, required-field validation, and generator test coverage. It also extends LLMInferenceService with six optional specification fields.

Changes

Generated Kubernetes resource support

Layer / File(s) Summary
Inference networking resources
ocp_resources/resource.py, ocp_resources/inference_pool_..., class_generator/tests/manifests/InferencePool/...
Adds inference networking API-group constants and two InferencePool variants with required-field validation and Kubernetes spec serialization.
Gateway and Kuadrant resources
ocp_resources/http_route.py, class_generator/tests/manifests/HTTPRoute/..., ocp_resources/kuadrant.py, class_generator/tests/manifests/Kuadrant/...
Adds HTTPRoute and Kuadrant resources with optional configuration fields and conditional serialization.
KServe inference resources and coverage
ocp_resources/llm_inference_service.py, ocp_resources/llm_inference_service_config.py, ocp_resources/local_model_namespace_cache.py, class_generator/tests/manifests/LLMInferenceService/..., class_generator/tests/manifests/LLMInferenceServiceConfig/..., class_generator/tests/manifests/LocalModelNamespaceCache/..., class_generator/tests/test_class_generator.py
Adds KServe resource classes, extends LLMInferenceService, validates required cache fields, serializes configured fields, and adds the new kinds to generator coverage.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: size/XL

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.72% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: adding model serving resource classes.
Description check ✅ Passed The description covers the purpose, new and updated resources, supporting changes, issue reference, and superseded PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@redhat-qe-bot

Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: Disabled for this repository
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: All label categories are enabled (default configuration)

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (PR author or approvers)
  • /hold cancel - Unblock PR merging (PR author or approvers)
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest python-module-install - Test Python package installation
  • /retest conventional-title - Validate commit message format
  • /retest all - Run all available tests

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. Status Checks: All required status checks must pass
  3. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  4. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge
AI Features
  • Conventional Title: Mode: fix (claude/claude-opus-4-6-1m)
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants