Skip to content

Commit

Permalink
when no type is specified, don't make illegal condition
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Sep 27, 2024
1 parent e56f20d commit 1004eef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controllers/routercerts/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func (c *routerCertsDomainValidationController) sync(ctx context.Context, syncCt
// set the condition anywhere in sync() to update the controller's degraded condition
var condition operatorv1.OperatorCondition
defer func() {
if len(condition.Type) == 0 {
// no change is desired. This happens when the SyncPartialSecret fails
return
}

_, _, err = v1helpers.UpdateStatus(ctx, c.operatorClient, v1helpers.UpdateConditionFn(condition))
}()

Expand Down

0 comments on commit 1004eef

Please sign in to comment.