Skip to content

Commit

Permalink
Trim down deployment triggers tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
psav committed Dec 9, 2021
1 parent b2d07c3 commit d039a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/cloud.redhat.com/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ func deploymentUpdateFunc(e event.UpdateEvent) bool {
if objNew.GetGeneration() != objOld.GetGeneration() {
return true
}
if (objOld.Status.AvailableReplicas != objNew.Status.AvailableReplicas) && (objNew.Status.AvailableReplicas == objNew.Status.Replicas) {
if (objOld.Status.AvailableReplicas != objNew.Status.AvailableReplicas) && (objNew.Status.AvailableReplicas == objNew.Status.ReadyReplicas) {
return true
}
if (objOld.Status.AvailableReplicas == objOld.Status.Replicas) && (objNew.Status.AvailableReplicas != objOld.Status.ReadyReplicas) {
if (objOld.Status.AvailableReplicas == objOld.Status.ReadyReplicas) && (objNew.Status.AvailableReplicas != objNew.Status.ReadyReplicas) {
return true
}
return false
Expand Down

0 comments on commit d039a7c

Please sign in to comment.