Skip to content

[Feature] Support progressDeadlineSeconds for CloneSet #2037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fromsaurav
Copy link

@fromsaurav fromsaurav commented May 15, 2025

[Feature] Support progressDeadlineSeconds for CloneSet

I. Describe what this PR does

This PR adds support for progressDeadlineSeconds to CloneSet, similar to what Kubernetes Deployments offer. This feature helps users understand the progress of CloneSet rollouts by adding a condition to indicate when an update is stuck.

II. Does this pull request fix one issue?

Fixes #2006

III. Describe how to verify it

  1. Deploy a CloneSet with progressDeadlineSeconds specified
  2. Trigger a rollout that will get stuck (e.g., by setting an impossible readiness check)
  3. Verify that after the specified deadline, the CloneSet status includes ProgressDeadlineExceeded condition

IV. Special notes for reviews

This implementation follows the same pattern as Kubernetes Deployments for tracking progress deadlines. The design aligns with the existing CloneSet architecture while adopting proven patterns from core Kubernetes.

What type of PR is this?

/kind feature

What does this PR do?

This PR adds support for progressDeadlineSeconds to CloneSet, similar to what Kubernetes Deployments offer. This feature helps users understand the progress of CloneSet rollouts by adding a condition to indicate when an update is stuck.

Features implemented:

  • Added progressDeadlineSeconds field to CloneSetSpec
  • Added logic to track progress and set conditions when deadline is exceeded
  • Added unit tests to verify behavior with different scenarios
  • Added documentation for the feature

Which issue(s) this PR fixes:

Fixes #2006

Testing done:

  • Added unit tests to verify behavior with different scenarios
  • Manually verified functionality in a test environment

Special notes for your reviewer:

This implementation follows the same pattern as Kubernetes Deployments for tracking progress deadlines.

@kruise-bot
Copy link

@fromsaurav: The label(s) kind/feature cannot be applied, because the repository doesn't have them.

In response to this:

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

What type of PR is this?

/kind feature

What does this PR do?

This PR adds support for progressDeadlineSeconds to CloneSet, similar to what Deployment offers. This feature helps users understand the progress of CloneSet rollouts by adding a condition to indicate when an update is stuck.

Features implemented:

  • Added progressDeadlineSeconds field to CloneSetSpec
  • Added logic to track progress and set conditions when deadline is exceeded
  • Added unit tests to verify behavior
  • Added documentation for the feature

Which issue(s) this PR fixes:

Fixes #2006

Testing done:

  • Added unit tests to verify behavior with different scenarios
  • Manually verified functionality in a test environment

Special notes for your reviewer:

This implementation follows the same pattern as Kubernetes Deployments for tracking progress deadlines.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kruise-bot kruise-bot requested review from shiyan2016 and veophi May 15, 2025 08:58
@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zmberg for approval by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

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 kruise-bot added the size/XL size/XL: 500-999 label May 15, 2025
Signed-off-by: Saurav Teli <[email protected]>
-e 

Signed-off-by: Saurav Teli <[email protected]>
@fromsaurav fromsaurav force-pushed the feature/cloneset-progress-deadline branch from a5862ee to 731e926 Compare May 15, 2025 09:14
Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 86 lines in your changes missing coverage. Please review.

Project coverage is 43.66%. Comparing base (ff8dcec) to head (731e926).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pkg/controller/cloneset/cloneset_status.go 0.00% 63 Missing and 1 partial ⚠️
pkg/controller/cloneset/cloneset_controller.go 0.00% 21 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2037      +/-   ##
==========================================
- Coverage   43.78%   43.66%   -0.12%     
==========================================
  Files         316      316              
  Lines       31617    31703      +86     
==========================================
  Hits        13842    13842              
- Misses      16378    16462      +84     
- Partials     1397     1399       +2     
Flag Coverage Δ
unittests 43.66% <0.00%> (-0.12%) ⬇️

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.

@furykerry
Copy link
Member

@fromsaurav thanks for your contribution to OpenKruise. However this issue is marked as the project for LFX mentorship term2, so we will accept the patch only if your application to the mentorship project is accepted. You can get familiar with OpenKruise with other issues that is not part of LFX mentorship program

@fromsaurav
Copy link
Author

@furykerry got that, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL size/XL: 500-999
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] support progressDeadlineSeconds for cloneset
3 participants