Skip to content

Conversation

@Danil-Grigorev
Copy link

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.

Fixes #313

Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
@Danil-Grigorev Danil-Grigorev force-pushed the custom-comparison-fleet branch 2 times, most recently from 9b2e36a to bb6f7d2 Compare June 5, 2025 14:39
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>
@Danil-Grigorev Danil-Grigorev force-pushed the custom-comparison-fleet branch 2 times, most recently from 90a74a8 to 78a61c7 Compare June 5, 2025 15:07
@Danil-Grigorev Danil-Grigorev changed the title Custom comparison fleet Perform ResourceDiff compare before patch Jun 5, 2025
.await
.map_err(PatchError::Get)?
{
if !res.diff(&existing) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@Danil-Grigorev Danil-Grigorev force-pushed the custom-comparison-fleet branch from 78a61c7 to 07af52a Compare June 6, 2025 10:10
@Danil-Grigorev Danil-Grigorev enabled auto-merge June 6, 2025 10:15
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
@Danil-Grigorev Danil-Grigorev force-pushed the custom-comparison-fleet branch from 07af52a to 7937262 Compare June 6, 2025 10:21
@Danil-Grigorev Danil-Grigorev added this pull request to the merge queue Jun 6, 2025
Merged via the queue into rancher:main with commit cfd3619 Jun 6, 2025
11 checks passed
@Danil-Grigorev Danil-Grigorev deleted the custom-comparison-fleet branch June 6, 2025 10:47
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infinite Fleet Cluster patching loop

2 participants