Skip to content

Commit

Permalink
Merge pull request #365 from stlaz/updatespam
Browse files Browse the repository at this point in the history
Bug 1891758: deployment: update event spam
  • Loading branch information
openshift-merge-robot committed Oct 27, 2020
2 parents 82e8f18 + 759e5d3 commit cc9d50e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controllers/deployment/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ func (c *deploymentController) updateOperatorDeploymentInfo(
operatorConfig *operatorv1.Authentication,
deployment *appsv1.Deployment,
) error {
operatorStatusOutdated := operatorConfig.Status.ObservedGeneration != operatorConfig.Generation || operatorConfig.Status.ReadyReplicas != deployment.Status.UpdatedReplicas
operatorStatusOutdated := operatorConfig.Status.ObservedGeneration != operatorConfig.Generation ||
operatorConfig.Status.ReadyReplicas != deployment.Status.UpdatedReplicas ||
resourcemerge.ExpectedDeploymentGeneration(deployment, operatorConfig.Status.Generations) != deployment.Generation

if operatorStatusOutdated {
if err := retry.RetryOnConflict(retry.DefaultRetry, func() error {
Expand Down

0 comments on commit cc9d50e

Please sign in to comment.