docs: add tutorial for progressive delivery on custom StatefulSet-like workloads#338
Conversation
…e workloads Kruise Rollout has supported rollouts for any custom CRD that uses the StatefulSet partition-based update model via the `rollouts.kruise.io/workload-type: statefulset` label, but this feature was entirely undocumented (issue openkruise#242). This commit adds: - docs/tutorials/custom_workload.md: step-by-step guide covering CRD structural requirements, how to label the workload, Rollout spec configuration, triggering and approving rollout steps, rollback, and troubleshooting tips. - CHANGELOG.md: note under v0.6.2 Docs section referencing openkruise#242. Signed-off-by: abhisheksainimitawa <abhi9813293405@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 @abhisheksainimitawa! It looks like this is your first PR to openkruise/rollouts 🎉 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #338 +/- ##
=======================================
Coverage 51.38% 51.38%
=======================================
Files 66 66
Lines 8559 8559
=======================================
Hits 4398 4398
Misses 3575 3575
Partials 586 586
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
Adds
docs/tutorials/custom_workload.md— a step-by-step guide documenting support for progressive delivery on custom CRDs that follow the StatefulSet update model.Also adds a Docs entry in
CHANGELOG.mdunder v0.6.2.Closes #242.
Why
The
rollouts.kruise.io/workload-type: statefulsetlabel has been supported in the codebase for a while (seepkg/util/constant.go,pkg/webhook/workload/mutating/unified_update_handler.go) but was never documented. Users with custom operators (Elasticsearch, Kafka, custom GameServer CRDs, etc.) that use a StatefulSet-style partition update model have no way to discover this capability.What the doc covers
partition=MaxInt32, Rollout controller advances partition per batchspec.replicas,spec.template,spec.updateStrategy.rollingUpdate.partitionmust existrollouts.kruise.io/workload-type: statefulsetlabel to the custom workloadworkloadRefpointing to the custom CRDkubectl-kruiseHow I verified the content
The doc was written by reading the actual implementation:
pkg/util/constant.go—WorkloadTypeLabelandStatefulSetTypeconstantspkg/webhook/workload/mutating/unified_update_handler.go— howworkload-typetriggers webhook interceptionpkg/util/parse_utils.go—IsStatefulSetRollingUpdateandSetStatefulSetPartition(shows the partition mechanism and CRD field requirements)pkg/controller/rollout/rollout_controller.go—patchWorkloadRolloutWebhookLabel(how the webhook is dynamically configured)Signed-off-by: abhisheksainimitawa abhi9813293405@gmail.com
/cc @furykerry @ls-2018