Skip to content

fix(policy-k8s): use correct resource labels in outbound indexer logs#15314

Merged
adleong merged 2 commits into
mainfrom
amr/use-egress_network-label-indexer-logs
May 28, 2026
Merged

fix(policy-k8s): use correct resource labels in outbound indexer logs#15314
adleong merged 2 commits into
mainfrom
amr/use-egress_network-label-indexer-logs

Conversation

@unleashed
Copy link
Copy Markdown
Member

The outbound policy index's IndexNamespacedResource<EgressNetwork>
implementation used service=name as the structured log field in its
four warn!() calls (accrual config, timeouts, HTTP retry, gRPC
retry). This was probably a copy-paste artifact from the adjacent
IndexNamespacedResource<Service> implementation, making log output
misleading when an EgressNetwork resource fails annotation parsing.

Additionally, both indexers used bare name, ns fields in their
debug!() calls while their sibling warn!() calls used explicit
labeled fields (service=name, namespace=ns and
egress_network=name, namespace=ns). This inconsistency meant the
same resource appeared under different field names depending on log
level.

This replaces service=name with egress_network=name in the four
EgressNetwork warn!() calls so operators see the correct resource
type when investigating parse errors, and adds explicit labels to
both indexers' debug!() calls so field names are consistent across
log levels within each implementation.

Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io>

unleashed added 2 commits May 26, 2026 10:36
The EgressNetwork indexer warning messages used service=name as the
structured log field, which is misleading when the resource being
indexed is an EgressNetwork. Change to egress_network=name in the four
warning lines (accrual config, timeouts, http retry, grpc retry) so
operators see the correct resource type when investigating parse
errors.

Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io>
The Service and EgressNetwork indexer debug!() calls used bare name
and ns fields, while their sibling warn!() calls used explicit
service=name and egress_network=name labels. Use labeled fields in
the debug lines as well so structured log output is consistent within
each indexer implementation.

Signed-off-by: Alejandro Martinez Ruiz <amr@buoyant.io>
@unleashed unleashed requested a review from a team as a code owner May 26, 2026 08:40
@adleong adleong merged commit 153bd80 into main May 28, 2026
69 of 73 checks passed
@adleong adleong deleted the amr/use-egress_network-label-indexer-logs branch May 28, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants