Skip to content

Commit 933b582

Browse files
authored
fix(logging): correct log formatting to avoid DPANIC in controller-runtime logger (#6846)
* Update filters.go Signed-off-by: TomerJLevy <TomerJlevy@gmail.com> * add release notes Signed-off-by: TomerJLevy <TomerJlevy@gmail.com> --------- Signed-off-by: TomerJLevy <TomerJlevy@gmail.com>
1 parent 64605e4 commit 933b582

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/provider/kubernetes/filters.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (r *gatewayAPIReconciler) getExtensionRefFilters(ctx context.Context) ([]un
2424
uExtResourceList := &unstructured.UnstructuredList{}
2525
uExtResourceList.SetGroupVersionKind(gvk)
2626
if err := r.client.List(ctx, uExtResourceList); err != nil {
27-
r.log.Info("no associated resources found for %s", gvk.String())
27+
r.log.Info("no associated resources found", "GVK", gvk.String())
2828
return nil, fmt.Errorf("failed to list %s: %w", gvk.String(), err)
2929
}
3030

@@ -57,7 +57,7 @@ func (r *gatewayAPIReconciler) getExtensionBackendResources(ctx context.Context)
5757
uExtResourceList := &unstructured.UnstructuredList{}
5858
uExtResourceList.SetGroupVersionKind(gvk)
5959
if err := r.client.List(ctx, uExtResourceList); err != nil {
60-
r.log.Info("no associated backend resources found for %s", gvk.String())
60+
r.log.Info("no associated backend resources found", "GVK", gvk.String())
6161
return nil, fmt.Errorf("failed to list %s: %w", gvk.String(), err)
6262
}
6363

release-notes/current.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ bug fixes: |
1414
Fixed %ROUTE_KIND% operator to be lower-cased when used by clusterStatName in EnvoyProxy API.
1515
Fixed maxAcceptPerSocketEvent being ignored in ClientTrafficPolicy
1616
Fixed the topologyInjectorDisabled and the local cluster was not defined.
17+
Fixed log formatting of improper key-value pairs to avoid DPANIC in controller-runtime logger.
1718
1819
# Enhancements that improve performance.
1920
performance improvements: |

0 commit comments

Comments
 (0)