Skip to content
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/contour: Refactor v2 contour files into v2 package #2928

Merged
merged 2 commits into from
Sep 23, 2020

Conversation

stevesloka
Copy link
Member

Refactors the contour package into a v2 package for Envoy API V2 types.
Common items are kept in the contour package for use by other versions.

This doesn't change anything functionally, just refactors contour into a v2 package.

Updates: #1898

Blocked waiting on #2921 to merge.

@stevesloka stevesloka added this to the 1.9.0 milestone Sep 20, 2020
@stevesloka stevesloka marked this pull request as draft September 20, 2020 21:39
@codecov
Copy link

codecov bot commented Sep 20, 2020

Codecov Report

Merging #2928 into main will not change coverage.
The diff coverage is 76.92%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2928   +/-   ##
=======================================
  Coverage   74.91%   74.91%           
=======================================
  Files          87       87           
  Lines        5604     5604           
=======================================
  Hits         4198     4198           
  Misses       1315     1315           
  Partials       91       91           
Impacted Files Coverage Δ
cmd/contour/serve.go 1.83% <0.00%> (ø)
internal/contour/snapshot.go 10.00% <ø> (ø)
internal/contour/v2/cluster.go 100.00% <ø> (ø)
internal/contour/v2/listener.go 95.10% <ø> (ø)
internal/contour/v2/route.go 93.26% <ø> (ø)
internal/contour/v2/secret.go 100.00% <ø> (ø)
cmd/contour/servecontext.go 90.24% <100.00%> (ø)
cmd/contour/shutdownmanager.go 32.35% <100.00%> (ø)
internal/contour/v2/endpointstranslator.go 77.02% <100.00%> (ø)
internal/featuretests/envoy.go 100.00% <100.00%> (ø)
... and 1 more

@skriss
Copy link
Member

skriss commented Sep 23, 2020

ready for a rebase

@stevesloka stevesloka marked this pull request as ready for review September 23, 2020 18:50
@stevesloka
Copy link
Member Author

all rebased @skriss

Refactors the contour package into a v2 package for Envoy API V2 types.
Common items are kept in the contour package for use by other versions.

This doesn't change anything functionally, just refactors contour into a v2 package.

Updates: projectcontour#1898

Signed-off-by: Steve Sloka <slokas@vmware.com>
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. I do think we could now consider moving internal/contour/v2 into a better-named package (e.g. internal/xdscache/v2 or something) now that they're separated out from the other things in internal/contour, but I'm fine following up on that later.

@@ -29,6 +29,7 @@ import (
contourv1 "github.com/projectcontour/contour/apis/projectcontour/v1"
"github.com/projectcontour/contour/internal/annotation"
"github.com/projectcontour/contour/internal/contour"
contourv2 "github.com/projectcontour/contour/internal/contour/v2"
Copy link
Member

Choose a reason for hiding this comment

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

it's a little unfortunate that contourv1 refers to the API package, while contourv2 refers to the internal package. We could use contourv1api or similar for the former. Not blocking.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup I agree. =)

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 opened #2938.

@stevesloka stevesloka merged commit 80c2c3a into projectcontour:main Sep 23, 2020
@stevesloka stevesloka deleted the refactorContourv2 branch September 23, 2020 20:12
@skriss
Copy link
Member

skriss commented Sep 23, 2020

I also opened #2939 for the other naming-related comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants