Skip to content

Commit

Permalink
Don't send stack status updates unless necessary (#175)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Ermakov <[email protected]>
  • Loading branch information
aermakov-zalando authored Nov 12, 2019
1 parent 9ad463c commit b30e04d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions controller/stackset.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,12 @@ func (c *StackSetController) ReconcileStatuses(ssc *core.StackSetContainer) erro
}
stack = updated
}
stack.Status = status
_, err := c.client.ZalandoV1().Stacks(sc.Namespace()).UpdateStatus(stack)
return err
if !equality.Semantic.DeepEqual(status, stack.Status) {
stack.Status = status
_, err := c.client.ZalandoV1().Stacks(sc.Namespace()).UpdateStatus(stack)
return err
}
return nil
})
if err != nil {
return c.errorEventf(sc.Stack, "FailedUpdateStackStatus", err)
Expand Down

0 comments on commit b30e04d

Please sign in to comment.