-
Couldn't load subscription status.
- Fork 11
Perform ResourceDiff compare before patch
#317
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
Merged
Danil-Grigorev
merged 3 commits into
rancher:main
from
Danil-Grigorev:custom-comparison-fleet
Jun 6, 2025
Merged
Perform ResourceDiff compare before patch
#317
Danil-Grigorev
merged 3 commits into
rancher:main
from
Danil-Grigorev:custom-comparison-fleet
Jun 6, 2025
Conversation
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
9b2e36a to
bb6f7d2
Compare
Introduces a `ResourceDiff` trait and implements it for various Fleet API resources. This allows controllers to perform more granular comparisons between the desired state and the current state of resources, avoiding unnecessary updates and reconciliations. Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
90a74a8 to
78a61c7
Compare
ResourceDiff compare before patch
anmazzotti
approved these changes
Jun 6, 2025
| .await | ||
| .map_err(PatchError::Get)? | ||
| { | ||
| if !res.diff(&existing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
78a61c7 to
07af52a
Compare
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
07af52a to
7937262
Compare
alexander-demicev
pushed a commit
to alexander-demicev/cluster-api-addon-provider-fleet
that referenced
this pull request
Jun 6, 2025
* Fmt fixes Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Implement custom resource comparison logic Introduces a `ResourceDiff` trait and implements it for various Fleet API resources. This allows controllers to perform more granular comparisons between the desired state and the current state of resources, avoiding unnecessary updates and reconciliations. Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> * Improve readability of the wait conditions individually Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> --------- Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Danil-Grigorev
added a commit
that referenced
this pull request
Jun 6, 2025
* Fmt fixes * Implement custom resource comparison logic Introduces a `ResourceDiff` trait and implements it for various Fleet API resources. This allows controllers to perform more granular comparisons between the desired state and the current state of resources, avoiding unnecessary updates and reconciliations. * Improve readability of the wait conditions individually --------- Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com> Co-authored-by: Danil Grigorev <danil.grigorev@suse.com>
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.
Introduces a
ResourceDifftrait and implements it for various Fleet API resources. This allows controllers to perform more granular comparisons between the desired state and the current state of resources, avoiding unnecessary updates and reconciliations.Fixes #313