Skip to content

Commit

Permalink
Merge pull request #1524 from mrlihanbo/automated-cherry-pick-of-#151…
Browse files Browse the repository at this point in the history
…3-upstream-release-1.0

Automated cherry pick of #1513: bugfix: aggregate status to binding when work's applied condition status changed
  • Loading branch information
karmada-bot committed Mar 23, 2022
2 parents 7cfdba5 + 7b0dd66 commit 722966d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/binding/common.go
Expand Up @@ -27,18 +27,18 @@ var workPredicateFn = builder.WithPredicates(predicate.Funcs{
return false
},
UpdateFunc: func(e event.UpdateEvent) bool {
var statusesOld, statusesNew []workv1alpha1.ManifestStatus
var statusesOld, statusesNew workv1alpha1.WorkStatus

switch oldWork := e.ObjectOld.(type) {
case *workv1alpha1.Work:
statusesOld = oldWork.Status.ManifestStatuses
statusesOld = oldWork.Status
default:
return false
}

switch newWork := e.ObjectNew.(type) {
case *workv1alpha1.Work:
statusesNew = newWork.Status.ManifestStatuses
statusesNew = newWork.Status
default:
return false
}
Expand Down

0 comments on commit 722966d

Please sign in to comment.