-
Notifications
You must be signed in to change notification settings - Fork 5.5k
transport sockets: support passthrough state for internal connections #19435
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
Merged
Merged
Changes from 63 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
5c04df2
internal listener: add metadata passthrough
kyessenov 2d97b10
fix
kyessenov 4b48cf8
fix
kyessenov cad2834
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 9210c0d
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 20ef02a
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov c179148
review
kyessenov de4bb84
oops
kyessenov 2a0baae
impl
kyessenov 28a8a95
impl
kyessenov a0eedce
fix metadata
kyessenov 942a0de
wire server
kyessenov 1901fbb
docs broke
kyessenov 71c4177
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 4f6402f
fix a bug and validate
kyessenov c645110
fix docs
kyessenov 8373eff
fix static initialization
kyessenov 168b782
fix build
kyessenov ff75d61
typo
kyessenov fabb13e
fix test
kyessenov 5b54ed1
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 3b2201f
fix
kyessenov 961cfb7
merge main
kyessenov 4fb2e84
try CI
kyessenov d3a6fad
support filter state
kyessenov d9d8690
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 3e9c0f2
rollback
kyessenov 5799114
fixes
kyessenov f1525f4
fix proto
kyessenov eb69dde
fix conflict
kyessenov a9bd24e
wip
kyessenov a651261
changes
kyessenov 0a9bf76
check spell
kyessenov 9dadef2
resolve dependency loop
kyessenov 7ae5f85
wip
kyessenov 0ddf84a
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov b45efb9
add unit test
kyessenov 6c9a0f1
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov cb37fba
review
kyessenov b8711ce
integration test
kyessenov 27b3d14
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 9afbbaf
bad release
kyessenov 84b3c91
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov bf02b8a
fix test
kyessenov f1aeaa7
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 76da2ca
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 648dd85
review
kyessenov 112cf60
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov a2da357
fix deprecated feature use
kyessenov 5dfab49
fix deprecated feature use
kyessenov 8d1ed10
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 5eba0e9
API review feedback
kyessenov 1381639
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov b3b1b1d
add filter state to integration test
kyessenov 2012ba5
coverage
kyessenov 37cda51
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov cc74397
update docs
kyessenov 0bd2862
merge fix
kyessenov 7bec6ea
merge fix
kyessenov e3942cb
build again
kyessenov 7c97a8a
change signature of createTransportSocket
kyessenov 47f422a
test on CI
kyessenov 990bf13
add docs
kyessenov 7aec8ee
Merge remote-tracking branch 'upstream/main' into internal_address_me…
kyessenov 1249d5e
merge fix
kyessenov b41b932
fix format
kyessenov 0192bbd
merge fix
kyessenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
api/envoy/extensions/transport_sockets/internal_upstream/v3/BUILD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. | ||
|
|
||
| load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") | ||
|
|
||
| licenses(["notice"]) # Apache 2 | ||
|
|
||
| api_proto_package( | ||
| deps = [ | ||
| "//envoy/config/core/v3:pkg", | ||
| "//envoy/type/metadata/v3:pkg", | ||
| "@com_github_cncf_udpa//udpa/annotations:pkg", | ||
| ], | ||
| ) |
73 changes: 73 additions & 0 deletions
73
api/envoy/extensions/transport_sockets/internal_upstream/v3/internal_upstream.proto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package envoy.extensions.transport_sockets.internal_upstream.v3; | ||
|
|
||
| import "envoy/config/core/v3/base.proto"; | ||
| import "envoy/type/metadata/v3/metadata.proto"; | ||
|
|
||
| import "udpa/annotations/status.proto"; | ||
| import "validate/validate.proto"; | ||
|
|
||
| option java_package = "io.envoyproxy.envoy.extensions.transport_sockets.internal_upstream.v3"; | ||
| option java_outer_classname = "InternalUpstreamProto"; | ||
| option java_multiple_files = true; | ||
| option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/internal_upstream/v3;internal_upstreamv3"; | ||
| option (udpa.annotations.file_status).package_version_status = ACTIVE; | ||
|
|
||
| // [#protodoc-title: Internal Upstream] | ||
| // [#extension: envoy.transport_sockets.internal_upstream] | ||
|
|
||
| // Configuration for the internal upstream address. An internal address defines | ||
| // a loopback user space socket residing in the same proxy instance. This | ||
| // extension allows passing additional structured state across the user space | ||
| // socket in addition to the regular byte stream. The purpose is to facilitate | ||
| // communication between filters on the downstream and the upstream internal | ||
| // connections. | ||
| // | ||
| // Because the passthrough state is transferred once per the upstream | ||
| // connection before the bytes payload, every passthrough filter state object | ||
| // is included in the hash key used to select an upstream connection if it | ||
| // implements a hashing interface. | ||
| // | ||
| // .. note:: | ||
| // | ||
| // Using internal upstream transport affects load balancing decisions if the | ||
| // passthrough state is derived from the downstream connection attributes. As | ||
| // an example, using the downstream source IP in the passthrough state will | ||
| // prevent sharing of an upstream internal connection between different source | ||
| // IPs. | ||
| message InternalUpstreamTransport { | ||
| // Describes the location of the imported metadata value. | ||
| // If the metadata with the given name is not present at the source location, | ||
| // then no metadata is passed through for this particular instance. | ||
| message MetadataValueSource { | ||
| // Specifies what kind of metadata. | ||
| type.metadata.v3.MetadataKind kind = 1 [(validate.rules).message = {required: true}]; | ||
|
|
||
| // Name is the filter namespace used in the dynamic metadata. | ||
| string name = 2 [(validate.rules).string = {min_len: 1}]; | ||
| } | ||
|
|
||
| // Describes the location of the imported filter state object from the downstream connection. | ||
| message FilterStateSource { | ||
| // Name is the imported filter state object name. | ||
| string name = 1 [(validate.rules).string = {min_len: 1}]; | ||
| } | ||
|
|
||
| // Specifies the metadata namespaces and values to insert into the downstream | ||
| // internal connection dynamic metadata when an internal address is used as a | ||
| // host. If the destination name is repeated across two metadata source | ||
| // locations, and both locations contain the metadata with the given name, | ||
| // then the latter in the list overrides the former. | ||
| repeated MetadataValueSource passthrough_metadata = 1; | ||
|
|
||
| // Specifies the list of the filter state object names to insert into the | ||
| // server internal connection from the downstream connection when an internal | ||
| // address is used as a host. The filter state objects must be mutable. These | ||
| // objects participate in the connection hashing decisions if they implement a | ||
| // hashing function. | ||
| repeated FilterStateSource passthrough_filter_state_objects = 2; | ||
|
kyessenov marked this conversation as resolved.
|
||
|
|
||
| // The underlying transport socket being wrapped. | ||
| config.core.v3.TransportSocket transport_socket = 3 [(validate.rules).message = {required: true}]; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.