Skip to content
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

Merged
merged 10 commits into from
Jan 23, 2025
8 changes: 4 additions & 4 deletions pkg/controllers/clusterresourceplacement/placement_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
return failedToScheduleClusterCount
}

// setFailedToScheduleResourcePlacementStatuses sets the resource placement statuses for the failed to schedule clusters.
// appendFailedToScheduleResourcePlacementStatuses sets the resource placement statuses for the failed to schedule clusters.
michaelawyu marked this conversation as resolved.
Show resolved Hide resolved
func appendFailedToScheduleResourcePlacementStatuses(
allRPS []fleetv1beta1.ResourcePlacementStatus,
unselected []*fleetv1beta1.ClusterDecision,
Expand Down Expand Up @@ -111,15 +111,15 @@
func determineExpectedCRPAndResourcePlacementStatusCondType(crp *fleetv1beta1.ClusterResourcePlacement) []condition.ResourceCondition {
switch {
case crp.Spec.Strategy.ApplyStrategy == nil:
return condition.CondTypesForCSAAndSSAApplyStrategies
return condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 114 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 114 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / staticcheck

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 114 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / staticcheck

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 114 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 114 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: condition.CondTypesForClientSideServerSideApplyStrategies
case crp.Spec.Strategy.ApplyStrategy.Type == fleetv1beta1.ApplyStrategyTypeReportDiff:
return condition.CondTypesForReportDiffApplyStrategy
default:
return condition.CondTypesForCSAAndSSAApplyStrategies
return condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 118 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 118 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / staticcheck

undefined: condition.CondTypesForClientSideServerSideApplyStrategies (compile)

Check failure on line 118 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / staticcheck

undefined: condition.CondTypesForClientSideServerSideApplyStrategies

Check failure on line 118 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: condition.CondTypesForClientSideServerSideApplyStrategies) (typecheck)

Check failure on line 118 in pkg/controllers/clusterresourceplacement/placement_status.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: condition.CondTypesForClientSideServerSideApplyStrategies
}
}

// setScheduledResourcePlacementStatuses sets the resource placement statuses for the scheduled clusters.
// appendScheduledResourcePlacementStatuses sets the resource placement statuses for the scheduled clusters.
michaelawyu marked this conversation as resolved.
Show resolved Hide resolved
func (r *Reconciler) appendScheduledResourcePlacementStatuses(
ctx context.Context,
allRPS []fleetv1beta1.ResourcePlacementStatus,
Expand Down
Loading
Loading