-
Notifications
You must be signed in to change notification settings - Fork 672
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
Introduce xdscache package to handle xds cache resources #2949
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2949 +/- ##
==========================================
- Coverage 76.45% 75.14% -1.31%
==========================================
Files 74 87 +13
Lines 5806 5678 -128
==========================================
- Hits 4439 4267 -172
- Misses 1272 1317 +45
+ Partials 95 94 -1
|
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.
Just looking at this again, mostly LGTM, but there are a few types that I don't think really belong under an internal/xdscache
package - I think it'd make sense to leave them in internal/contour
for now and we can decide if they should move somewhere else separately.
cmd/contour/serve.go
Outdated
|
||
dnsLookupFamily, err := ParseDNSLookupFamily(ctx.DNSLookupFamily) | ||
if err != nil { | ||
return fmt.Errorf("failed to configure configuration file parameter cluster.dns-lookup-family: %w", err) | ||
} | ||
|
||
// Build the core Kubernetes event handler. | ||
eventHandler := &contour.EventHandler{ | ||
eventHandler := &xdscache.EventHandler{ |
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'd probably leave the EventHandler
type in the internal/contour
package, not sure it makes sense under xdscache
.
cmd/contour/serve.go
Outdated
@@ -339,7 +339,7 @@ func doServe(log logrus.FieldLogger, ctx *serveContext) error { | |||
// Wrap eventHandler in a converter for objects from the dynamic client. | |||
// and an EventRecorder which tracks API server events. | |||
dynamicHandler := &k8s.DynamicClientHandler{ | |||
Next: &contour.EventRecorder{ | |||
Next: &xdscache.EventRecorder{ |
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.
EventRecorder
seems like another one that should probably stay where it is.
cmd/contour/serve.go
Outdated
@@ -444,7 +444,7 @@ func doServe(log logrus.FieldLogger, ctx *serveContext) error { | |||
|
|||
// Once we have the leadership detection channel, we can | |||
// push DAG rebuild metrics onto the observer stack. | |||
eventHandler.Observer = &contour.RebuildMetricsObserver{ | |||
eventHandler.Observer = &xdscache.RebuildMetricsObserver{ |
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.
RebuildMetricsObserver
- keep in internal/contour
?
d1957bc
to
8c32370
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
Probably should update the commit msg/PR title since the whole package isn't being renamed. |
…rnal/contour package into. Fixes projectcontour#2939 Signed-off-by: Steve Sloka <slokas@vmware.com>
8c32370
to
93ab567
Compare
Fixes #2939
Signed-off-by: Steve Sloka slokas@vmware.com