Add support for DaemonSet to AdvancedDaemonSet migration #158
Open
GautamBytes wants to merge 2 commits intoopenkruise:masterfrom
Open
Add support for DaemonSet to AdvancedDaemonSet migration #158GautamBytes wants to merge 2 commits intoopenkruise:masterfrom
GautamBytes wants to merge 2 commits intoopenkruise:masterfrom
Conversation
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
Signed-off-by: GautamBytes <manchandanigautam@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 |
Contributor
Author
|
@furykerry can you please review this , its corrected as per your comments here . Also , can u guide me how to fix this lint error the error logs shows files which i didn't modify. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ⅰ. Describe what this PR does
This PR introduces the functionality to migrate a native Kubernetes
DaemonSetto a KruiseAdvancedDaemonSetvia thekubectl-kruise migratecommand.The implementation includes:
migratecommand now acceptsDaemonSetas a source (--from) andAdvancedDaemonSetas a destination.--createand--copyflags are intentionally disallowed for this migration type, as the concept of an "empty"DaemonSetis not applicable. The command will return an error if these flags are used.DaemonSetfirst, and then creating the newAdvancedDaemonSet. This prevents duplicate pod creation and allows the new controller to safely adopt the existing pods, ensuring zero downtime.Example Usage:
# Migrate pods from an existing DaemonSet to an AdvancedDaemonSet. kubectl-kruise migrate AdvancedDaemonSet --from DaemonSet -n default --src-name my-ds --dst-name my-adsⅡ. Does this pull request fix one issue?
fixes #129
Ⅲ. Special notes for reviews
This implementation is modeled after the existing
DeploymenttoCloneSetmigration to maintain consistency within the project.The core logic for the migration path relies on
DeletePropagationOrphanto ensure a safe handover of pods. The logic is contained within thepkg/migration/daemonsetpackage.