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
internal/xds: convert v3 protobufs automatically #3074
Conversation
/cc @stevesloka |
Codecov Report
@@ Coverage Diff @@
## main #3074 +/- ##
==========================================
- Coverage 73.99% 73.61% -0.39%
==========================================
Files 101 101
Lines 6280 6360 +80
==========================================
+ Hits 4647 4682 +35
- Misses 1530 1576 +46
+ Partials 103 102 -1
|
Thanks for this @jpeach! This is a neat approach to moving form one version to the next. Taking some time to think through this a bit more and how it might integrate I'm leaning towards our original plan of duplicating code into a
I'm still open to discussing this moving forward since this is a pretty big decision. What is everyone else's thoughts? |
5a7c045
to
68a6754
Compare
I verified that migrating the protobufs through JSON serialization drops the migrated fields:
Envoy has internal code that migrates field in the version converter. Possibly if we just rewrite the typeURL the internal envoy code will do the right thing. Experimenting ... |
Confirmed that this works:
However, doing this once at the top level ends up with Envoy requesting a mixture of v2 and v3 resources:
So we probably need to rewrite all the interior typeURLs too. |
0f0ba79
to
bc79a4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one small comment; I think @stevesloka needs to approve too though, as I'm not familiar enough with the protos to be 100%.
0bdf204
to
095a894
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing through this on my local cluster I keep getting log messages like this:
2020/10/30 10:42:12 missing conversion for *envoy_config_accesslog_v2.FileAccessLog, good luck
2020/10/30 10:42:12 missing conversion for *envoy_config_filter_http_lua_v2.Lua, good luck
2020/10/30 10:42:12 missing conversion for *envoy_config_filter_http_ext_authz_v2.ExtAuthz, good luck
2020/10/30 10:42:12 missing conversion for *envoy_config_accesslog_v2.FileAccessLog, good luck
2020/10/30 10:42:12 missing conversion for *envoy_config_filter_http_ext_authz_v2.ExtAuthzPerRoute, good luck
2020/10/30 10:42:12 missing conversion for *envoy_extensions_filters_network_http_connection_manager_v3.HttpConnectionManager, good luck
Force support for xDS v3 by mapping the v3 endpoints to the internal v2 resource caches. Since the xDS upgrade is wire-compatible, we can force an initial upgrade my rewriting the type URLs of embedded messages and forcing v3 in the dynamic resource configuration. This updates projectcontour#1898. Signed-off-by: James Peach <jpeach@vmware.com>
095a894
to
d59b1c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other comments; LGTM assuming testing's OK (has seemed fine in my limited smoke-tests).
Signed-off-by: James Peach jpeach@vmware.com