webhookcachefiller adds more detail when it chooses to update or not update status conditions

This commit is contained in:
Joshua Casey
2024-08-05 11:32:20 -07:00
committed by Ryan Richard
parent ca5bb2170c
commit 1438f06c12
2 changed files with 33 additions and 26 deletions
@@ -479,11 +479,14 @@ func (c *webhookCacheFillerController) updateStatus(
)
if equality.Semantic.DeepEqual(original, updated) {
logger.Debug("choosing to not update the webhookauthenticator status since there is no update to make",
"phase", updated.Status.Phase)
return nil
}
_, err := c.client.AuthenticationV1alpha1().WebhookAuthenticators().UpdateStatus(ctx, updated, metav1.UpdateOptions{})
if err == nil {
logger.Debug("webhookauthenticator status successfully updated")
logger.Debug("webhookauthenticator status successfully updated",
"phase", updated.Status.Phase)
}
return err
}