Skip to content

feat: promote InferenceSet to v1beta1 and enable EnableInferenceSetController by default - #2112

Merged
zhuangqh merged 33 commits into
kaito-project:mainfrom
andyzhangx:feat/inferenceset-beta-promotion
Jun 22, 2026
Merged

feat: promote InferenceSet to v1beta1 and enable EnableInferenceSetController by default#2112
zhuangqh merged 33 commits into
kaito-project:mainfrom
andyzhangx:feat/inferenceset-beta-promotion

Conversation

@andyzhangx

@andyzhangx andyzhangx commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

Changes

  1. Promote InferenceSet CRD to v1beta1 - Add InferenceSet types to api/v1beta1/ with validation, defaulting, and DeepCopy
  2. Set v1beta1 as the storage version - +kubebuilder:storageversion moved from v1alpha1 to v1beta1; CRD updated with v1beta1 as storage and v1alpha1 still served for backward compatibility
  3. Enable EnableInferenceSetController feature gate by default - Change default from false to true (both in code and Helm chart)
  4. Migrate all internal references - All controllers (InferenceSet, drift, autoupgrade), webhooks, manifests, metrics, and utilities now use kaitov1beta1.InferenceSet* types
  5. Register both v1alpha1 and v1beta1 InferenceSet in webhooks - Ensures backward compatibility during CRD transition
  6. Update CRD manifest - config/crd/bases/kaito.sh_inferencesets.yaml and Helm chart template now define both v1alpha1 and v1beta1
  7. Migrate E2E tests - E2E test helpers and functions updated to use v1beta1 InferenceSet types
  8. Use GetInferenceSetRuntimeName helper - Eliminated duplicated runtime selection logic in inferencePoolTargetPort, removed cross-version kaitov1alpha1 dependency
  9. Fix metrics phase label - determineInferenceSetPhase now returns "succeeded" to match metric bucket labels

CRD Version Configuration

The CRD now defines two versions with the following settings:

Version served storage Meaning
v1alpha1 true false API server still accepts v1alpha1 requests (backward compatible for existing clients/scripts), but objects are no longer stored in this format
v1beta1 true true API server accepts v1beta1 requests, and all objects are stored in etcd using this format
  • served: Whether the API server exposes this version as an endpoint. When true, clients can use this version in their API requests (e.g., kubectl get inferencesets.v1alpha1.kaito.sh still works).
  • storage: Which version format is used to persist objects in etcd. Only one version can be the storage version. The API server automatically converts between served versions and the storage version on read/write.

Motivation

  • InferenceSet has been stable since v0.6.x and is actively used for multi-replica inference workloads
  • P/D disaggregation (MultiRoleInference) depends on InferenceSet being enabled
  • Users currently must manually set --feature-gates=enableInferenceSetController=true which is unnecessary friction
  • Aligns with Kubernetes API maturity conventions (alpha → beta when API is stable)

Storage Version

  • v1beta1 is now the storage version — all new objects are stored as v1beta1
  • v1alpha1 remains served for backward compatibility (existing clients can still read/write using v1alpha1 API)
  • Since v1alpha1 and v1beta1 share identical Spec/Status schemas, no conversion webhook is needed at this time

Related Issues

@andyzhangx
andyzhangx force-pushed the feat/inferenceset-beta-promotion branch from a300da2 to 958f8da Compare June 17, 2026 07:22
@andyzhangx
andyzhangx force-pushed the feat/inferenceset-beta-promotion branch from 958f8da to 9e055d3 Compare June 17, 2026 07:30
@andyzhangx
andyzhangx force-pushed the feat/inferenceset-beta-promotion branch from b615586 to 6e93b17 Compare June 17, 2026 07:58
Complete the InferenceSet v1beta1 promotion:
- Move +kubebuilder:storageversion marker from v1alpha1 to v1beta1
- Migrate controller reconcile loop to use kaitov1beta1.InferenceSet
- Migrate utility functions (UpdateInferenceSetStatus, etc.) to v1beta1
- Migrate drift controller to v1beta1 types
- Migrate metrics to v1beta1 types
- Align all tests to v1beta1 types
- Update ownerReference GVKs to v1beta1
- Update test fixtures with correct annotation keys (kaito.io)
- Add v1beta1 version entry to kaito.sh_inferencesets.yaml CRD with storage: true
- Set v1alpha1 to storage: false (still served for backward compatibility)
- v1beta1 markers already have +kubebuilder:storageversion
The e2e test installs InferenceSet CRD from the Helm chart template, which
only had v1alpha1. Since the controller now uses kaito.sh/v1beta1, the CRD
must serve v1beta1. Copy the updated CRD (with both v1alpha1 served and
v1beta1 as storage version) to the Helm chart template.
… tests to v1beta1

- Set featureGates.enableInferenceSetController=true in Helm values.yaml
- Update README to reflect new default
- Migrate e2e test helpers and test functions to use kaitov1beta1.InferenceSet
- Update InferenceSetList and condition type references to v1beta1
Remove GetInferenceSetRuntimeName, IsRunBenchmarkEnabled, and
ShouldRunBenchmark from api/v1alpha1/labels.go since the controller
now uses the v1beta1 equivalents. Also remove the corresponding
tests from labels_test.go.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 34 out of 35 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • api/v1beta1/zz_generated.deepcopy.go: Generated file
Comment thread pkg/inferenceset/metrics.go
Comment thread pkg/inferenceset/metrics_test.go
- Fix metrics phase: return 'succeeded' (not 'ready') to match metric
  bucket labels in monitorInferenceSets
- Use GetInferenceSetRuntimeName helper in inferencePoolTargetPort to
  eliminate duplicated runtime selection logic and remove v1alpha1
  dependency (kaitov1alpha1.MultiRoleInferenceRoleDecode)
- Remove unused featuregates import from manifests.go
- Rename receiver from 'w' to 'i' in InferenceSet.SetDefaults
- Use IsInferenceSetBenchmarkEnabled in controller test instead of
  inline annotation check
- Add missing 'config' field to Metric schema in CRD manifest

Signed-off-by: andyzhangx <andyzhangx@live.com>
tc.inferenceset is already *v1beta1.InferenceSet, no need for &.

Signed-off-by: andyzhangx <andyzhangx@live.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 34 out of 35 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • api/v1beta1/zz_generated.deepcopy.go: Generated file
Comment thread pkg/workspace/manifests/manifests.go Outdated
Comment thread pkg/inferenceset/metrics.go
Comment thread api/v1beta1/inferenceset_validation.go
- Define InferenceRoleDecode constant in v1beta1/labels.go and use it
  in inferencePoolTargetPort instead of hardcoded "decode" string
- Lower webhook validation logs from Info to V(2) to reduce noise on
  every create/update request

Signed-off-by: andyzhangx <andyzhangx@live.com>
@zhuangqh

zhuangqh commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

please leave v1alpha1 pkg unchanged. others looks good.

Revert the removal of GetInferenceSetRuntimeName, IsRunBenchmarkEnabled,
ShouldRunBenchmark from api/v1alpha1/labels.go and their tests from
labels_test.go. These functions are still needed in the v1alpha1 package.
The test functions for GetInferenceSetRuntimeName are no longer needed
in the v1alpha1 package.
Restore TestGetInferenceSetRuntimeName tests in api/v1alpha1/labels_test.go.
Keep the original feature-gate-based runtime detection logic instead of
calling GetInferenceSetRuntimeName. Only the type signature changes from
v1alpha1 to v1beta1 for the InferenceSet promotion.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 33 out of 34 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • api/v1beta1/zz_generated.deepcopy.go: Generated file
Comment thread pkg/inferenceset/metrics.go
Comment thread pkg/inferenceset/metrics_test.go
Comment thread pkg/workspace/manifests/manifests.go Outdated
Signed-off-by: Andy Zhang <xiazhang@microsoft.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 33 out of 34 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • api/v1beta1/zz_generated.deepcopy.go: Generated file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants