Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawyu committed Jan 17, 2025
1 parent e38817f commit 5154f61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/controllers/clusterresourceplacement/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,18 @@ func isRolloutCompleted(crp *fleetv1beta1.ClusterResourcePlacement) bool {
return false
}

skippedCondTypes := skippedCondTypesForCSASSAApplyStrategyTypes
if crp.Spec.Strategy.ApplyStrategy != nil && crp.Spec.Strategy.ApplyStrategy.Type == fleetv1beta1.ApplyStrategyTypeReportDiff {
skippedCondTypes = skippedCondTypesForReportDiffApplyStrategyType
}
for i := condition.RolloutStartedCondition; i < condition.TotalCondition; i++ {
// If the CRP has an apply strategy of the ClientSideApply or ServerSideApply type, skip
// checking the DiffReported condition type; similarly, should the apply strategy be of
// the ReportDiff type, Fleet will skip checking the Applied and Available condition
// type.
if _, ok := skippedCondTypes[i]; ok {
continue
}
if !condition.IsConditionStatusTrue(crp.GetCondition(string(i.ClusterResourcePlacementConditionType())), crp.Generation) {
return false
}
Expand Down

0 comments on commit 5154f61

Please sign in to comment.