Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@stevesloka
Copy link
Member

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]

@stevesloka stevesloka added this to the 1.10.0 milestone Oct 27, 2020
@stevesloka stevesloka added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 27, 2020
@codecov
Copy link

codecov bot commented Oct 27, 2020

Codecov Report

Merging #3073 into main will increase coverage by 0.17%.
The diff coverage is 45.71%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
cmd/contour/serve.go 0.00% <0.00%> (ø)
internal/xds/v2/server.go 100.00% <ø> (ø)
internal/xds/v3/server.go 0.00% <ø> (ø)
internal/featuretests/v2/featuretests.go 90.10% <100.00%> (-0.06%) ⬇️
internal/xds/server.go 100.00% <100.00%> (ø)

Copy link
Member

@skriss skriss left a 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?

if len(p.Server.XDSServerVersions) == 0 {
return fmt.Errorf("at least one xds server version must be specified")
}
for _, v := range p.Server.XDSServerVersions {
Copy link
Member

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].

Copy link
Member Author

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

Copy link
Contributor

@jpeach jpeach left a 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!

@stevesloka
Copy link
Member Author

This field will default to [v2] now, then [v2, v3] when we support both, and then just [v3] once we drop v2 support - right?

Yes, once we fully make v3 the default, we'll swap the default values, then will need to deprecate out the v2 version.

@stevesloka
Copy link
Member Author

stevesloka commented Oct 28, 2020

@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 {
Copy link
Contributor

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.

Copy link
Member Author

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. 😢

… 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]>
Copy link
Member

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stevesloka stevesloka merged commit 0b7b641 into projectcontour:main Oct 28, 2020
@stevesloka stevesloka deleted the xdsversion branch October 28, 2020 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants