Skip to content

feat: Native DaemonSet Progressive Delivery - Part 2: Advanced DaemonSet Controller#316

Merged
kruise-bot merged 12 commits intoopenkruise:masterfrom
marcoma2018:ds/two
Nov 13, 2025
Merged

feat: Native DaemonSet Progressive Delivery - Part 2: Advanced DaemonSet Controller#316
kruise-bot merged 12 commits intoopenkruise:masterfrom
marcoma2018:ds/two

Conversation

@marcoma2018
Copy link
Copy Markdown
Contributor

Summary

This PR implements Part 2 of 3 in the Native DaemonSet Progressive Delivery support to fulfill the feature request. This implementation focuses on the advanced DaemonSet controller logic that enable fine-grained control over pod deletion and rollout progression for standard Kubernetes DaemonSets (apps/v1) within the Kruise Rollout framework.

Implementation Details

  1. Advanced Native DaemonSet Controller

    • New dedicated controller in pkg/controller/nativedaemonset/.
    • Implements sophisticated pod deletion logic based on partition annotations.
    • Handles batch-by-batch rollout progression while adhering to maxUnavailable constraints.
    • Manages OnDelete strategy enforcement and pod lifecycle control.
    • Supports revision-based pod targeting and controlled deletion sequences.
  2. Enhanced Webhook Mutation Logic

    • Improved mutation webhook in pkg/webhook/workload/mutating/workload_update_handler.go.
    • Added original update strategy preservation via the DaemonSetOriginalUpdateStrategy annotation.
    • Restore the original update strategy by annotation at Finalize.
  3. Controller Registration and Integration

    • Controller setup in pkg/controller/nativedaemonset/nativedaemonset_controller.go.
    • Integrated with existing controller manager infrastructure.
    • Added proper event handling and reconciliation logic.

What's Next

This is Part 2 of 3 in the Native DaemonSet Progressive Delivery implementation:

  • Part 1: ✅ Core controller infrastructure and BatchRelease integration (Completed)
  • Part 2: ✅ Advanced DaemonSet controller and two leftover enhancements (This PR)
  • Part 3: Integration tests, end-to-end validation, and documentation

…Set controller

Signed-off-by: Marco Ma <qingjin_ma@163.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 70.44855% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.36%. Comparing base (501d832) to head (5abbbed).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ller/nativedaemonset/nativedaemonset_controller.go 52.80% 73 Missing and 11 partials ⚠️
pkg/util/parse_utils.go 34.88% 24 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #316      +/-   ##
==========================================
+ Coverage   50.60%   51.36%   +0.75%     
==========================================
  Files          64       66       +2     
  Lines        8201     8551     +350     
==========================================
+ Hits         4150     4392     +242     
- Misses       3478     3574      +96     
- Partials      573      585      +12     
Flag Coverage Δ
unittests 51.36% <70.44%> (+0.75%) ⬆️

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.

Signed-off-by: Marco Ma <qingjin_ma@163.com>
@marcoma2018
Copy link
Copy Markdown
Contributor Author

Hi @furykerry, @zmberg and @AiRanthem

Could you take a look and approve it? Then I will submit the third PR. Thanks!

BR,
Marco

Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
Signed-off-by: Marco Ma <qingjin_ma@163.com>
@zmberg
Copy link
Copy Markdown
Member

zmberg commented Nov 13, 2025

/lgtm
/approve

@kruise-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zmberg

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

@kruise-bot kruise-bot merged commit 3c731a5 into openkruise:master Nov 13, 2025
34 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.

4 participants