Skip to content

Commit

Permalink
Fix terminationhandler sync
Browse files Browse the repository at this point in the history
In a scenario where the pod owned by the DaemonSet is crash looping for reasons waitForDaemonSetRollout won't be run and so we don't signal degraded in the clusterOperator status.

This PR fixes the above by running waitForDaemonSetRollout on every reconcile regardless of the DaemonSet spec is updated or not.
  • Loading branch information
enxebre committed Jul 17, 2020
1 parent c9a1f75 commit 383ae08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/operator/sync.go
Expand Up @@ -133,11 +133,12 @@ func (optr *Operator) syncTerminationHandler(config *OperatorConfig) error {
if err != nil {
return err
}

if updated {
resourcemerge.SetDaemonSetGeneration(&optr.generations, ds)
return optr.waitForDaemonSetRollout(terminationDaemonSet)
}
return nil

return optr.waitForDaemonSetRollout(terminationDaemonSet)
}

func (optr *Operator) syncWebhookConfiguration() error {
Expand Down

0 comments on commit 383ae08

Please sign in to comment.