-
Notifications
You must be signed in to change notification settings - Fork 703
config: Change xds-server-version to be plural and serve multiple xDS versions #3073
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3073 +/- ##
==========================================
+ Coverage 73.21% 73.39% +0.17%
==========================================
Files 95 96 +1
Lines 6056 6040 -16
==========================================
- Hits 4434 4433 -1
+ Misses 1521 1506 -15
Partials 101 101
|
skriss
left a comment
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.
This looks OK to me pending the one comment.
This field will default to [v2] now, then [v2, v3] when we support both, and then just [v3] once we drop v2 support - right?
pkg/config/parameters.go
Outdated
| if len(p.Server.XDSServerVersions) == 0 { | ||
| return fmt.Errorf("at least one xds server version must be specified") | ||
| } | ||
| for _, v := range p.Server.XDSServerVersions { |
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.
it'd probably be good to de-dupe the list too, so [v2, v2] becomes just [v2].
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.
I added a bit about de-duping in the validate method. Please take a look @skriss
jpeach
left a comment
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, just a few nits. Nice work!
Yes, once we fully make v3 the default, we'll swap the default values, then will need to deprecate out the v2 version. |
3d3e4f1 to
bb60880
Compare
|
@jpeach all updated. Also please let me know if you agree with the extra default cases for the version: |
| envoy_server_v2.NewServer(context.Background(), snapshotCache, nil), | ||
| registry, | ||
| ctx.grpcOptions(log)...) | ||
| for _, ver := range ctx.Config.Server.XDSServerVersions { |
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.
Quick drive-by suggestion ... it might be cleaner to make this more like xds.NewContourServer(vers, log, other params) and let the package deal with the versioning internally.
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.
I had that originally, but ran into import cycle errors. 😢
bb60880 to
1d722ba
Compare
… versions Changes the xds-server-version config item to be plural so that users can specify a set of xDS versions Contour will serve. Defaults to V2 only for now. Updates projectcontour#1898 Updates projectcontour#3047 Signed-off-by: Steve Sloka <[email protected]>
1d722ba to
49096f5
Compare
skriss
left a comment
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
Changes the xds-server-version config item to be plural so that users can specify a set
of xDS versions Contour will serve. Defaults to V2 only for now.
Updates #1898
Updates #3047
Signed-off-by: Steve Sloka [email protected]