Skip to content

Upgrade Cloneset from v1alpha1 to v1beta1#2225

Merged
furykerry merged 1 commit into
openkruise:masterfrom
PersistentJZH:feat/upgrade-kruise-apis-to-v1beta1-phrase-5
Dec 26, 2025
Merged

Upgrade Cloneset from v1alpha1 to v1beta1#2225
furykerry merged 1 commit into
openkruise:masterfrom
PersistentJZH:feat/upgrade-kruise-apis-to-v1beta1-phrase-5

Conversation

@PersistentJZH

@PersistentJZH PersistentJZH commented Nov 1, 2025

Copy link
Copy Markdown
Member

Ⅰ. Describe what this PR does

upgrade Cloneset from v1alpha1 to v1beta1

  1. change scaleStrategy.disablePVCReuse(default false) to scaleStrategy.enablePVCReuse(default false)

  2. transfer annotation apps.kruise.io/cloneset-scaling-exclude-preparing-delete to scaleStrategy.excludePreparingDelete

  3. optimize CloneSetUpdateStrategy structure

  4. transfer image preDownload related annotations to spec field

Ⅱ. Does this pull request fix one issue?

#2122

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch 5 times, most recently from 49cc5b7 to 1187cfd Compare November 1, 2025 16:17
@codecov

codecov Bot commented Nov 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.56962% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.95%. Comparing base (c246310) to head (6d9fc3b).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
pkg/webhook/cloneset/validating/validation.go 28.57% 105 Missing and 10 partials ⚠️
...neset/validating/cloneset_create_update_handler.go 0.00% 56 Missing ⚠️
...loneset/mutating/cloneset_create_update_handler.go 0.00% 51 Missing ⚠️
...oller/uniteddeployment/adapter/cloneset_adapter.go 25.00% 15 Missing ⚠️
pkg/controller/cloneset/core/cloneset_core.go 16.66% 9 Missing and 1 partial ⚠️
.../controller/cloneset/cloneset_predownload_image.go 65.38% 8 Missing and 1 partial ⚠️
pkg/controller/cloneset/cloneset_controller.go 68.18% 6 Missing and 1 partial ⚠️
...kg/controller/cloneset/sync/cloneset_sync_utils.go 66.66% 5 Missing and 2 partials ⚠️
pkg/controller/cloneset/sync/cloneset_update.go 46.15% 2 Missing and 5 partials ⚠️
pkg/controller/cloneset/utils/cloneset_utils.go 74.07% 7 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2225      +/-   ##
==========================================
+ Coverage   47.89%   47.95%   +0.06%     
==========================================
  Files         324      324              
  Lines       27520    27843     +323     
==========================================
+ Hits        13181    13353     +172     
- Misses      12844    12964     +120     
- Partials     1495     1526      +31     
Flag Coverage Δ
unittests 47.95% <45.56%> (+0.06%) ⬆️

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.

@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch 5 times, most recently from 0d3ead7 to 0844d5f Compare November 5, 2025 11:03
@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch 2 times, most recently from 0ed533a to 9893d29 Compare November 11, 2025 11:03
@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch 13 times, most recently from 2f881ee to 9c25eab Compare November 24, 2025 10:54
@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch 6 times, most recently from a9e1d74 to f644ced Compare November 26, 2025 08:03
@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch from f644ced to a1567b5 Compare November 30, 2025 06:06
// Validate Parallelism (only supports integer, not percentage)
if obj.Spec.Parallelism != nil {
parallelism := obj.Spec.Parallelism
if parallelism.Type == 1 { // 1 is String type

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.

replace constant with intstr.String

// Validate Parallelism (only supports integer, not percentage)
if obj.Spec.Parallelism != nil {
parallelism := obj.Spec.Parallelism
if parallelism.Type == 1 { // 1 is String type

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.

replace constant with intstr.String

@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch from 1b7e8a4 to a673d8a Compare December 5, 2025 09:12
Signed-off-by: PersistentJZH <zhihao.kan17@gmail.com>

- add OnDelete Strategy in v1bata1 CloneSet

- add ProgressDeadlineSeconds in v1beta1 in cloneset

- optimize CloneSetUpdateStrategy structure

- transfer image preDownload related annotations to spec field

- add image pre download field validate

replace constant with intstr.String

Signed-off-by: PersistentJZH <zhihao.kan17@gmail.com>
@PersistentJZH PersistentJZH force-pushed the feat/upgrade-kruise-apis-to-v1beta1-phrase-5 branch from a673d8a to 6d9fc3b Compare December 5, 2025 09:56
@PersistentJZH PersistentJZH changed the title [WIP] Upgrade Cloneset from v1alpha1 to v1beta1 Upgrade Cloneset from v1alpha1 to v1beta1 Dec 5, 2025

@furykerry furykerry left a comment

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.

/lgtm
/approve

@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: furykerry

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

@furykerry furykerry merged commit a1502a3 into openkruise:master Dec 26, 2025
57 of 59 checks passed
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.

3 participants