-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: enable the CRP controller to process DiffReported condition #1017
Conversation
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.
just some high level comments
Refactored the code as discussed offline. |
pkg/controllers/clusterresourceplacement/placement_status_test.go
Outdated
Show resolved
Hide resolved
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.
please look for the condition.TotalCondition usage to make sure it still works.
Note: as prev. discussed, the minor change needed on the CRP watcher will be sent as a separate PR. |
pkg/utils/condition/condition.go
Outdated
TotalCondition | ||
) | ||
|
||
var ( | ||
// Different set of condition types that Fleet will populate. | ||
CondTypesForCSAAndSSAApplyStrategies = []ResourceCondition{ |
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.
i was thinking ReportDiff is a CondTypesForNoApplyOperationStrategies.
yeah, using the full name may be better.
@@ -109,7 +109,7 @@ func TestFindPlacementsSelectedDeletedResV1Alpha1(t *testing.T) { | |||
Status: fleetv1alpha1.ClusterResourcePlacementStatus{ | |||
SelectedResources: []fleetv1alpha1.ResourceIdentifier{ | |||
{ | |||
Group: "abd", | |||
Group: "xyz", |
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.
This change is solely made to pass the codespeller check; apparently the program thinks abd
as a misspelling.
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.
Same for the change below.
Description of your changes
This PR enables the CRP controller to process DiffReported condition.
I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer