fix(deployment): migrate workload update calls to patch#328
fix(deployment): migrate workload update calls to patch#328Nazihbenbrahim wants to merge 2 commits intoopenkruise:masterfrom
Conversation
Signed-off-by: Nazih Ben Brahim <nazihbenbrahim9@gmail.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @Nazihbenbrahim! It looks like this is your first PR to openkruise/rollouts 🎉 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #328 +/- ##
==========================================
+ Coverage 51.38% 52.47% +1.08%
==========================================
Files 66 66
Lines 8559 8568 +9
==========================================
+ Hits 4398 4496 +98
+ Misses 3575 3479 -96
- Partials 586 593 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Nazih Ben Brahim <nazihbenbrahim9@gmail.com>
|
@furykerry Can you please review this PR |
Ⅰ. Describe what this PR does
This PR migrates the remaining workload-related
Updatecalls toPatchin the advanced deployment controller to improve Kubernetes version-skew safety.When Rollouts is built against older Kubernetes API types but runs against a newer cluster, full-object
Updatemay erase fields unknown to the old client structs.Patchonly sends the changed delta and avoids overwriting unknown fields.This PR changes:
Deployment.Status().Update(...)calls withStatus().Patch(...)in the advanced deployment controllerc.Update(...)withc.Patch(...)inUpdateFinalizerMain code changes:
pkg/controller/deployment/deployment_controller.gopkg/controller/deployment/sync.gopkg/util/workloads_utils.goTests added/updated:
pkg/controller/deployment/status_patch_test.gopkg/controller/deployment/deployment_controller_test.gopkg/util/workloads_utils_test.goⅡ. Does this pull request fix one issue?
fixes #273
Ⅲ. Special notes for reviews
Verification commands: