Skip to content

feat(sandbox-controller): support rolling update of sandboxset#256

Merged
zmberg merged 1 commit intoopenkruise:masterfrom
BITLiutianyang:support-sbs-update
Apr 22, 2026
Merged

feat(sandbox-controller): support rolling update of sandboxset#256
zmberg merged 1 commit intoopenkruise:masterfrom
BITLiutianyang:support-sbs-update

Conversation

@BITLiutianyang
Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR does

Support rolliing update of SandboxSet

Ⅱ. Does this pull request fix one issue?

fixes #76 .

Ⅲ. Describe how to verify it

  1. Create a SandboxSet.
  2. Update its spec.template, and set spec.updateStrategy as needed. (For now, MaxSurge and MaxUnavailable is supported. They can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%), and default is 20%. MaxSurge is the maximum number or percentage of pods that can be created above the desired number of pods. MaxUnavailable is the maximum number or percentage of pods that can be unavailable during the update.)
  3. The Sandboxes managed by the SandboxSet should be rolling updated according to the update config.

Ⅳ. Special notes for reviews

This PR does not resolve all features mentioned in the issue. It is the first in a series of PRs.

@kruise-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found 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

@kruise-bot
Copy link
Copy Markdown

Welcome @BITLiutianyang! It looks like this is your first PR to openkruise/agents 🎉

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 76.08696% with 66 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.94%. Comparing base (6d2d715) to head (bef58d2).
⚠️ Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/sandboxset/rolling_update.go 67.39% 38 Missing and 7 partials ⚠️
pkg/controller/sandboxset/sandboxset_controller.go 82.25% 6 Missing and 5 partials ⚠️
pkg/sandbox-manager/infra/sandboxcr/claim.go 72.72% 5 Missing and 1 partial ⚠️
pkg/controller/sandboxset/heap.go 92.68% 2 Missing and 1 partial ⚠️
pkg/sandbox-manager/infra/sandboxcr/sandbox.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
+ Coverage   66.27%   68.94%   +2.66%     
==========================================
  Files         111      114       +3     
  Lines        7418    10319    +2901     
==========================================
+ Hits         4916     7114    +2198     
- Misses       2216     2901     +685     
- Partials      286      304      +18     
Flag Coverage Δ
unittests 68.94% <76.08%> (+2.66%) ⬆️

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.

@BITLiutianyang BITLiutianyang force-pushed the support-sbs-update branch 7 times, most recently from ac414e9 to e4af614 Compare April 15, 2026 11:28
@BITLiutianyang BITLiutianyang force-pushed the support-sbs-update branch 2 times, most recently from c0b5361 to af42f29 Compare April 19, 2026 16:02
Comment thread pkg/controller/sandboxset/rolling_update_test.go
Comment thread pkg/controller/sandboxset/rolling_update.go Outdated
Comment thread pkg/controller/sandboxset/rolling_update.go Outdated
Comment thread pkg/controller/sandboxset/rolling_update.go Outdated
Comment thread pkg/sandbox-manager/infra/sandboxcr/claim.go Outdated
Comment thread api/v1alpha1/sandboxset_types.go
if err != nil {
return err
}
// If cache is stale, fetch from API server directly
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.

delete commented code

Comment thread config/crd/bases/agents.kruise.io_sandboxsets.yaml
Copy link
Copy Markdown
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

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

/lgtm

@zmberg zmberg merged commit fd22af6 into openkruise:master Apr 22, 2026
12 of 13 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.

[feature request] enable rolling update of sandboxset

4 participants