Skip to content

fix(crd): align AgentRuntime CRD with CodeInterpreter annotations and types#210

Merged
volcano-sh-bot merged 4 commits intovolcano-sh:mainfrom
mahil-2040:fix/agentruntime-crd-consistency
Feb 12, 2026
Merged

fix(crd): align AgentRuntime CRD with CodeInterpreter annotations and types#210
volcano-sh-bot merged 4 commits intovolcano-sh:mainfrom
mahil-2040:fix/agentruntime-crd-consistency

Conversation

@mahil-2040
Copy link
Copy Markdown
Contributor

@mahil-2040 mahil-2040 commented Feb 8, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it:

This PR adds missing kubebuilder annotations and types to the AgentRuntime CRD to achieve consistency with the CodeInterpreter CRD and enable proper typed client-go generation.

Changes

  • Added kubebuilder annotations (+genclient, +k8s:deepcopy-gen:interfaces, +kubebuilder:object:root=true, +kubebuilder:subresource:status, etc.) to the AgentRuntime type
  • Added AgentRuntimeList type for Kubernetes list operations
  • Added Conditions field to AgentRuntimeStatus to enable status reporting
  • Added type metadata variables in register.go (AgentRuntimeKind, etc.)
  • Generated typed clientset, informers, and listers for AgentRuntime
  • Added Age column to kubectl get agentruntimes output via additionalPrinterColumns
  • Enabled status subresource in the AgentRuntime CRD manifest

Which issue(s) this PR fixes:
Fixes #209

Special notes for your reviewer:

Most files in client-go and the CRD manifest are auto-generated by make gen-all (which runs controller-gen, client-gen, lister-gen, and informer-gen).

The core manual changes are limited to:

  • agent_type.go — added kubebuilder annotations, AgentRuntimeList, and status fields
  • register.go — added type metadata variables
  • agentruntime.go — fixed .GroupResource() call to match the CodeInterpreter pattern

Verification

  • make gen-check
  • make lint

All checks pass successfully.

Does this PR introduce a user-facing change?:

AgentRuntime CRD now includes status subresource and Age column in kubectl output. Status can be updated independently to report runtime readiness and conditions.

… types

Signed-off-by: Mahil Patel <mahilpatel0808@gmail.com>
Copilot AI review requested due to automatic review settings February 8, 2026 18:20
@volcano-sh-bot volcano-sh-bot added the kind/bug Something isn't working label Feb 8, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @mahil-2040, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the AgentRuntime Custom Resource Definition (CRD) by bringing its structure and generated client-go components into alignment with the existing CodeInterpreter CRD. The changes introduce critical Kubebuilder annotations, a dedicated list type, and fields for status reporting, which collectively enable proper client-go generation and enhance the CRD's operational capabilities within Kubernetes.

Highlights

  • CRD Annotations and Types: The AgentRuntime Custom Resource Definition (CRD) now includes essential Kubebuilder annotations (+genclient, +k8s:deepcopy-gen:interfaces, +kubebuilder:object:root=true, +kubebuilder:subresource:status, etc.) and a new AgentRuntimeList type, ensuring consistency with the CodeInterpreter CRD.
  • Status Subresource and Fields: The AgentRuntimeStatus has been enhanced with Conditions and a Ready boolean field, enabling robust status reporting and independent status updates.
  • Client-Go Generation: All necessary typed clientset, informers, and listers for AgentRuntime have been generated, facilitating programmatic interaction with the CRD.
  • kubectl Output Enhancement: The AgentRuntime CRD manifest now includes additionalPrinterColumns, adding an "Age" column to the kubectl get agentruntimes output for better visibility.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • client-go/clientset/versioned/typed/runtime/v1alpha1/agentruntime.go
    • New file generated for the AgentRuntime client interface, enabling CRUD operations.
  • client-go/clientset/versioned/typed/runtime/v1alpha1/fake/fake_agentruntime.go
    • New file generated for a fake AgentRuntime client, useful for testing.
  • client-go/clientset/versioned/typed/runtime/v1alpha1/fake/fake_runtime_client.go
    • Modified to include the AgentRuntimes getter in the fake client, allowing access to fake AgentRuntime resources.
  • client-go/clientset/versioned/typed/runtime/v1alpha1/generated_expansion.go
    • Modified to add the AgentRuntimeExpansion interface, allowing for future custom client methods.
  • client-go/clientset/versioned/typed/runtime/v1alpha1/runtime_client.go
    • Modified to include the AgentRuntimesGetter interface and its implementation, providing access to AgentRuntime resources via the main client.
  • client-go/informers/externalversions/generic.go
    • Modified to register the AgentRuntime resource with the generic informer factory, making it discoverable for dynamic informers.
  • client-go/informers/externalversions/runtime/v1alpha1/agentruntime.go
    • New file generated for the AgentRuntime informer, providing a mechanism to watch for changes to AgentRuntime objects.
  • client-go/informers/externalversions/runtime/v1alpha1/interface.go
    • Modified to add the AgentRuntimes informer getter, allowing access to the AgentRuntime informer.
  • client-go/listers/runtime/v1alpha1/agentruntime.go
    • New file generated for the AgentRuntime lister, providing read-only access to AgentRuntime objects from a local cache.
  • client-go/listers/runtime/v1alpha1/expansion_generated.go
    • Modified to add AgentRuntimeListerExpansion and AgentRuntimeNamespaceListerExpansion interfaces for custom lister methods.
  • manifests/charts/base/crds/runtime.agentcube.volcano.sh_agentruntimes.yaml
    • Modified to add additionalPrinterColumns for displaying the "Age" of AgentRuntime resources in kubectl output and enabled the status subresource.
  • pkg/apis/runtime/v1alpha1/agent_type.go
    • Modified to add Kubebuilder annotations (+genclient, +k8s:deepcopy-gen:interfaces, +kubebuilder:object:root=true, +kubebuilder:subresource:status, +kubebuilder:resource:scope=Namespaced, +kubebuilder:printcolumn), introduce the AgentRuntimeList type, and include Conditions and Ready fields in AgentRuntimeStatus.
  • pkg/apis/runtime/v1alpha1/register.go
    • Modified to add AgentRuntimeKind, AgentRuntimeGroupKind, AgentRuntimeListKind, and AgentRuntimeGroupVersionKind variables for type metadata.
  • pkg/apis/runtime/v1alpha1/zz_generated.deepcopy.go
    • Modified to update the deepcopy logic for AgentRuntime and add deepcopy functions for AgentRuntimeList and the new Conditions field in AgentRuntimeStatus.
Activity
  • The author has verified the changes by running make gen-check and make lint, both of which passed successfully.
  • Most of the changes in client-go and the CRD manifest are auto-generated by make gen-all, which executes controller-gen, client-gen, lister-gen, and informer-gen.
  • Manual changes were focused on agent_type.go (annotations, AgentRuntimeList, status fields), register.go (type metadata), and agentruntime.go (fixing a .GroupResource() call).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly aligns the AgentRuntime CRD with the CodeInterpreter CRD by adding the necessary kubebuilder annotations, status fields, and list types. This enables the generation of a typed client-go clientset, informers, and listers, which are all correctly included. The CRD manifest is also properly updated to enable the status subresource and add a printer column for better kubectl usability. The changes are well-executed and follow standard practices for Kubernetes CRD development. I have one minor suggestion to improve code clarity by removing a redundant variable.

Signed-off-by: Mahil Patel <mahilpatel0808@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the AgentRuntime CRD/type definitions with the existing CodeInterpreter patterns so controller-gen and client-go generation produce full deep-copies, list types, and typed clients, while also improving kubectl UX (Age column) and enabling status subresource updates.

Changes:

  • Added missing kubebuilder/codegen annotations plus AgentRuntimeList and scheme registration for AgentRuntime.
  • Extended AgentRuntimeStatus with conditions and ready and updated generated deep-copy code accordingly.
  • Regenerated CRD YAML + client-go typed clientset/informers/listers to include AgentRuntime, including status subresource and an Age printer column.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/apis/runtime/v1alpha1/agent_type.go Adds kubebuilder annotations, AgentRuntimeList, and status fields; registers types with SchemeBuilder.
pkg/apis/runtime/v1alpha1/register.go Adds exported type metadata vars for AgentRuntime to match existing CodeInterpreter pattern.
pkg/apis/runtime/v1alpha1/zz_generated.deepcopy.go Generated deep-copy updates for AgentRuntime(Status) and new AgentRuntimeList + DeepCopyObject methods.
manifests/charts/base/crds/runtime.agentcube.volcano.sh_agentruntimes.yaml Enables status subresource, adds Age printer column, and updates schema for new status fields.
client-go/listers/runtime/v1alpha1/expansion_generated.go Adds lister expansion hooks for AgentRuntime (generated).
client-go/listers/runtime/v1alpha1/agentruntime.go Adds AgentRuntime lister implementation (generated).
client-go/informers/externalversions/runtime/v1alpha1/interface.go Exposes AgentRuntimes() informer on the runtime/v1alpha1 informer interface (generated).
client-go/informers/externalversions/runtime/v1alpha1/agentruntime.go Adds AgentRuntimeInformer implementation (generated).
client-go/informers/externalversions/generic.go Adds generic informer mapping for agentruntimes resource (generated).
client-go/clientset/versioned/typed/runtime/v1alpha1/runtime_client.go Adds typed getter for AgentRuntimes() (generated).
client-go/clientset/versioned/typed/runtime/v1alpha1/generated_expansion.go Adds typed client expansion hook for AgentRuntime (generated).
client-go/clientset/versioned/typed/runtime/v1alpha1/fake/fake_runtime_client.go Adds fake typed getter for AgentRuntimes() (generated).
client-go/clientset/versioned/typed/runtime/v1alpha1/fake/fake_agentruntime.go Adds fake typed client for AgentRuntime (generated).
client-go/clientset/versioned/typed/runtime/v1alpha1/agentruntime.go Adds typed client interface/implementation for AgentRuntime (generated).

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 8, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 6.45161% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.04%. Comparing base (845b798) to head (e9aa355).
⚠️ Report is 91 commits behind head on main.

Files with missing lines Patch % Lines
pkg/apis/runtime/v1alpha1/zz_generated.deepcopy.go 0.00% 29 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #210      +/-   ##
==========================================
+ Coverage   35.60%   42.04%   +6.43%     
==========================================
  Files          29       30       +1     
  Lines        2533     2590      +57     
==========================================
+ Hits          902     1089     +187     
+ Misses       1505     1369     -136     
- Partials      126      132       +6     
Flag Coverage Δ
unittests 42.04% <6.45%> (+6.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Mahil Patel <mahilpatel0808@gmail.com>
@mahil-2040
Copy link
Copy Markdown
Contributor Author

@hzxuzhonghu can you please review this PR?

Comment on lines +63 to +69
// Conditions represent the latest available observations of the AgentRuntime's state
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`

// Ready indicates whether the AgentRuntime is ready to serve requests
// +optional
Ready bool `json:"ready,omitempty"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please remove this first, I would rather vote for Accepted than Ready

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, can you check it now?

Copilot AI review requested due to automatic review settings February 9, 2026 13:25
Signed-off-by: Mahil Patel <mahilpatel0808@gmail.com>
@mahil-2040 mahil-2040 force-pushed the fix/agentruntime-crd-consistency branch from 11baf2b to e9aa355 Compare February 9, 2026 13:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

@mahil-2040
Copy link
Copy Markdown
Contributor Author

hey @hzxuzhonghu i have made the changes you asked for can you take a look at it?

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Namespaced
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please show the kubectl get AgentRuntime output?

I guess this is generated by AI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review and merge!

To clarify regarding the code style - I used CodeInterpreter it as a direct reference to ensure AgentRuntime has consistent behavior and structure. That similarity is intentional, not just auto-generated.
Here is the kubectl get agentruntimes output from my local verification, it confirms that AGE column is present and working as expected:

image

Copy link
Copy Markdown
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

@volcano-sh-bot volcano-sh-bot merged commit 9d84727 into volcano-sh:main Feb 12, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentRuntime CRD is Missing Critical Annotations and Types

5 participants