Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use debug level for readiness checks logs #5029

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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())
czeslavo marked this conversation as resolved.
Show resolved Hide resolved
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()),
czeslavo marked this conversation as resolved.
Show resolved Hide resolved
"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