Skip to content

[release-1.29] Support disabling baggage-based peer metadata discovery based on metadata#6856

Merged
istio-testing merged 6 commits intoistio:release-1.29from
istio-testing:cherry-pick-6851-to-release-1.29
Mar 2, 2026
Merged

[release-1.29] Support disabling baggage-based peer metadata discovery based on metadata#6856
istio-testing merged 6 commits intoistio:release-1.29from
istio-testing:cherry-pick-6851-to-release-1.29

Conversation

@istio-testing
Copy link
Collaborator

This is an automated cherry-pick of #6851

…data

The issue with the current implementation of the baggage-based peer
metadata discovery is that when via DestinationRule we configure PROXY
or TLS, waypoint will use a transport socket different from RawBuffer
(RawBuffer just sends bytes as-is without adding any protocol there).

peer_metadata filters communicate with each other by injecting data into
data stream, so these transport sockets interfere with that.

As a quick fix, until we find a way to avoid injecting into data stream,
I want to disable baggage based metadata discovery on
cluster-by-cluster or endpoint-by-endpoint basis.

It's not enough to just skip adding filters in the controlplane to
achieve that, because connect_originate and inner_connect_originate
listeners may be used by different clusters with different properties,
so if we don't add peer_metadata filters to those at all, it would
affect clusters where no TLS or PROXY protocol is configured.

Thus to avoid that I want to be able to disable baggage-based metadata
discovery via metadata.

I use metadata object key `istio.peer_metadata` and field
`disable_baggage_discovery` for the metadata. The upstream filter will
check endpoint and cluster level metadata, while regular network filter
will only check metadata on the StreamInfo level - that's because we
expect the metadata to be passed using InternalUpstreamTransport to the
regular network filter.

NOTE: I separated implementation into header and source to make it
easier to write unit tests.

NOTE: I tested this implementation using integration tests from the
main istio repo with baggage metadata discovery enabled, but this PR by
itself is not enough - we also need to change pilot to generate the
dynamic metadata.

NOTE: It's part of the fix for http://github.com/istio/istio/issues/59117.

Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
… tests

Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
@istio-testing istio-testing requested a review from a team as a code owner February 27, 2026 04:14
@istio-testing istio-testing added the release-notes-none Indicates a PR that does not require release notes. label Feb 27, 2026
@istio-testing istio-testing added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 27, 2026
Signed-off-by: Mikhail Krinkin <mkrinkin@microsoft.com>
@krinkinmu
Copy link
Contributor

I'm looking into test failures on this cherry pick now.

@krinkinmu
Copy link
Contributor

I/O error, will retry the test.

@krinkinmu
Copy link
Contributor

/test release-test-arm64

1 similar comment
@krinkinmu
Copy link
Contributor

/test release-test-arm64

@istio-testing istio-testing merged commit 89746f1 into istio:release-1.29 Mar 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes-none Indicates a PR that does not require release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants