diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c3a41bded..c9273aa42b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/internal/clients/readiness.go b/internal/clients/readiness.go index 62c37eb17f..50270f5235 100644 --- a/internal/clients/readiness.go +++ b/internal/clients/readiness.go @@ -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 } @@ -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 } diff --git a/internal/dataplane/sendconfig/backoff_strategy.go b/internal/dataplane/sendconfig/backoff_strategy.go index cc1921b54e..dbdc67a555 100644 --- a/internal/dataplane/sendconfig/backoff_strategy.go +++ b/internal/dataplane/sendconfig/backoff_strategy.go @@ -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()