Skip to content

Commit

Permalink
fix: use debug level for readiness checks logs
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Oct 31, 2023
1 parent 10879ed commit 9f2b6c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ Adding a new version? You'll need three changes:
deterministically sorted by their creation timestamps, names and internal
rule orders to `2^12=4096` and number of `GRPCRoutes` can be sorted to `2^8=256`.
[#5024](https://github.com/Kong/kubernetes-ingress-controller/pull/5024)
- Error logs emitted from Gateway Discovery readiness checker that should be
logged at `debug` level are now logged at that level.
[#5029](https://github.com/Kong/kubernetes-ingress-controller/pull/5029)

### Changed

Expand Down
6 changes: 3 additions & 3 deletions internal/clients/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (c DefaultReadinessChecker) checkPendingClient(
client, err := c.factory.CreateAdminAPIClient(ctx, pendingClient)
if err != nil {
// Despite the error reason we still want to keep the client in the pending list to retry later.
c.logger.V(util.DebugLevel).Error(err, fmt.Sprintf("pending client for %q is not ready yet", pendingClient.Address))
c.logger.V(util.DebugLevel).Info(fmt.Sprintf("pending client for %q is not ready yet", pendingClient.Address), "reason", err.Error())
return nil
}

Expand Down Expand Up @@ -148,9 +148,9 @@ func (c DefaultReadinessChecker) checkAlreadyCreatedClient(ctx context.Context,
defer cancel()
if err := client.IsReady(ctx); err != nil {
// Despite the error reason we still want to keep the client in the pending list to retry later.
c.logger.V(util.DebugLevel).Error(
err,
c.logger.V(util.DebugLevel).Info(
fmt.Sprintf("already created client for %q is not ready, moving to pending", client.BaseRootURL()),
"reason", err.Error(),
)
return false
}
Expand Down
2 changes: 1 addition & 1 deletion internal/dataplane/sendconfig/backoff_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (s UpdateStrategyWithBackoff) Update(ctx context.Context, targetContent Con

err, resourceErrors, resourceErrorsParseErr = s.decorated.Update(ctx, targetContent)
if err != nil {
s.logger.V(util.DebugLevel).Error(err, "Update failed, registering it for backoff strategy")
s.logger.V(util.DebugLevel).Info("Update failed, registering it for backoff strategy", "reason", err.Error())
s.backoffStrategy.RegisterUpdateFailure(err, targetContent.Hash)
} else {
s.backoffStrategy.RegisterUpdateSuccess()
Expand Down

0 comments on commit 9f2b6c0

Please sign in to comment.