Skip to content

chore(role-instance): init apiversion v1alpha2 for roleInstance and r…#186

Merged
cheyang merged 2 commits intosgl-project:mainfrom
Syspretor:chore/init-role-instanceset-apiversion-v1alpha2
Mar 9, 2026
Merged

chore(role-instance): init apiversion v1alpha2 for roleInstance and r…#186
cheyang merged 2 commits intosgl-project:mainfrom
Syspretor:chore/init-role-instanceset-apiversion-v1alpha2

Conversation

@Syspretor
Copy link
Copy Markdown
Collaborator

…oleInstanceSet

Ⅰ. Motivation

Ⅱ. Modifications

Ⅲ. Does this pull request fix one issue?

fixes #XXXX

Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅴ. Describe how to verify it

VI. Special notes for reviews

Checklist

  • Format your code make fmt.
  • Add unit tests or integration tests.
  • Update the documentation related to the change.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 establishes the v1alpha2 API for RoleInstance and RoleInstanceSet custom resources. It defines the structural schemas for these new Kubernetes workload types, detailing their desired state and observed status, and includes all necessary client-side code for their management and interaction within a Kubernetes cluster. This enhancement expands the platform's ability to define and control complex application deployments.

Highlights

  • New API Version v1alpha2: Introduced the v1alpha2 API version for RoleInstance and RoleInstanceSet custom resources, laying the foundation for new workload management capabilities.
  • RoleInstance CRD Definition: Added the RoleInstance Custom Resource Definition (CRD) with its Spec and Status fields, including components, readiness policies, restart policies, and readiness gates.
  • RoleInstanceSet CRD Definition: Added the RoleInstanceSet Custom Resource Definition (CRD) defining desired replicas, selectors, scaling strategies, update strategies, revision history, and lifecycle hooks.
  • Client-side Code Generation: Generated deepcopy functions, apply configurations, fake clients, informers, and listers for the new RoleInstance and RoleInstanceSet types, enabling programmatic interaction with these resources.

🧠 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
  • api/workloads/v1alpha2/roleinstance_types.go
    • Added the RoleInstance Custom Resource Definition (CRD) schema.
  • api/workloads/v1alpha2/roleinstanceset_types.go
    • Added the RoleInstanceSet Custom Resource Definition (CRD) schema.
  • api/workloads/v1alpha2/zz_generated.deepcopy.go
    • Updated deepcopy functions to include RoleInstance and RoleInstanceSet types.
  • client-go/applyconfiguration/utils.go
    • Updated ForKind function to register apply configurations for new RoleInstance and RoleInstanceSet related types.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstance.go
    • Added apply configuration for the RoleInstance type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancecomponent.go
    • Added apply configuration for the RoleInstanceComponent type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancecomponentstatus.go
    • Added apply configuration for the RoleInstanceComponentStatus type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancecondition.go
    • Added apply configuration for the RoleInstanceCondition type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancereadinessgate.go
    • Added apply configuration for the RoleInstanceReadinessGate type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstanceset.go
    • Added apply configuration for the RoleInstanceSet type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetcondition.go
    • Added apply configuration for the RoleInstanceSetCondition type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetinplaceupdatestrategy.go
    • Added apply configuration for the RoleInstanceSetInPlaceUpdateStrategy type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetlifecycle.go
    • Added apply configuration for the RoleInstanceSetLifecycle type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetlifecyclehook.go
    • Added apply configuration for the RoleInstanceSetLifecycleHook type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetscalestrategy.go
    • Added apply configuration for the RoleInstanceSetScaleStrategy type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetspec.go
    • Added apply configuration for the RoleInstanceSetSpec type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetstatus.go
    • Added apply configuration for the RoleInstanceSetStatus type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancesetupdatestrategy.go
    • Added apply configuration for the RoleInstanceSetUpdateStrategy type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancespec.go
    • Added apply configuration for the RoleInstanceSpec type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancestatus.go
    • Added apply configuration for the RoleInstanceStatus type.
  • client-go/applyconfiguration/workloads/v1alpha2/roleinstancetemplate.go
    • Added apply configuration for the RoleInstanceTemplate type.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/fake/fake_roleinstance.go
    • Added fake client implementation for RoleInstance.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/fake/fake_roleinstanceset.go
    • Added fake client implementation for RoleInstanceSet.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/fake/fake_workloads_client.go
    • Updated fake client to include RoleInstances and RoleInstanceSets.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/generated_expansion.go
    • Updated expansion interfaces to include RoleInstanceExpansion and RoleInstanceSetExpansion.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/roleinstance.go
    • Added client interface for RoleInstance.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/roleinstanceset.go
    • Added client interface for RoleInstanceSet.
  • client-go/clientset/versioned/typed/workloads/v1alpha2/workloads_client.go
    • Updated WorkloadsV1alpha2Interface to include getters for RoleInstances and RoleInstanceSets.
  • client-go/informers/externalversions/generic.go
    • Updated generic informer to include RoleInstance and RoleInstanceSet resources.
  • client-go/informers/externalversions/workloads/v1alpha2/interface.go
    • Updated informer interface to include RoleInstanceInformer and RoleInstanceSetInformer.
  • client-go/informers/externalversions/workloads/v1alpha2/roleinstance.go
    • Added informer for RoleInstance.
  • client-go/informers/externalversions/workloads/v1alpha2/roleinstanceset.go
    • Added informer for RoleInstanceSet.
  • client-go/listers/workloads/v1alpha2/expansion_generated.go
    • Updated lister expansion interfaces to include RoleInstanceListerExpansion and RoleInstanceSetListerExpansion.
  • client-go/listers/workloads/v1alpha2/roleinstance.go
    • Added lister for RoleInstance.
  • client-go/listers/workloads/v1alpha2/roleinstanceset.go
    • Added lister for RoleInstanceSet.
  • config/crd/bases/workloads.x-k8s.io_roleinstances.yaml
    • Added the Custom Resource Definition (CRD) YAML for RoleInstance.
  • config/crd/bases/workloads.x-k8s.io_roleinstancesets.yaml
    • Added the Custom Resource Definition (CRD) YAML for RoleInstanceSet.
Activity
  • The pull request description indicates that the motivation and modifications sections are currently empty, suggesting it might be an early draft.
  • No specific test cases were added, as indicated by the empty section in the PR description.
  • The checklist items for formatting, unit/integration tests, and documentation updates are all unchecked.
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.

@Syspretor Syspretor force-pushed the chore/init-role-instanceset-apiversion-v1alpha2 branch from 1f0c375 to 553a329 Compare March 9, 2026 12:35
Copy link
Copy Markdown

@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 introduces the v1alpha2 API version for RoleInstance and RoleInstanceSet, along with the necessary auto-generated client-go code, informers, listers, and CRD definitions. The changes are extensive but mostly generated. My review focuses on the new type definitions. I've found a few inconsistencies in comments and default values within the API types that should be addressed to ensure clarity and correctness for users of this new API version.

Comment thread api/workloads/v1alpha2/roleinstanceset_types.go Outdated
Comment thread api/workloads/v1alpha2/roleinstance_types.go Outdated
Comment thread api/workloads/v1alpha2/roleinstanceset_types.go Outdated
Comment thread api/workloads/v1alpha2/roleinstanceset_types.go Outdated
@Syspretor Syspretor force-pushed the chore/init-role-instanceset-apiversion-v1alpha2 branch from fb0a5f7 to 5fc19c1 Compare March 9, 2026 12:59
Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@cheyang cheyang merged commit e8d4c70 into sgl-project:main Mar 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants