-
Notifications
You must be signed in to change notification settings - Fork 360
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
refactor telemetry backendRefs #3293
Conversation
08ca96d
to
0b3d6bb
Compare
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
0b3d6bb
to
246a49f
Compare
Signed-off-by: zirain <zirain2009@gmail.com>
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! no questions from my side.
@@ -226,18 +239,6 @@ func (r *gatewayAPIReconciler) Reconcile(ctx context.Context, _ reconcile.Reques | |||
gwcResource.Namespaces = append(gwcResource.Namespaces, namespace) | |||
} | |||
|
|||
// Process the parametersRef of the accepted GatewayClass. |
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.
curious why we moved this away from L241
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.
need update allAssociatedBackendRefs
first.
@@ -1465,6 +1466,60 @@ func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1 | |||
validationErr = fmt.Errorf("invalid envoyproxy: %w", err) | |||
continue | |||
} | |||
|
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.
we probably also need to enhance
func (r *gatewayAPIReconciler) validateServiceForReconcile(obj client.Object) bool { |
Service
changes
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.
yeah, but want to do that in an seperated PR.
Signed-off-by: zirain <zirain2009@gmail.com>
internal/xds/translator/testdata/out/xds-ir/tracing.clusters.yaml
Outdated
Show resolved
Hide resolved
internal/xds/translator/testdata/out/xds-ir/tracing-endpoint-stats.listeners.yaml
Show resolved
Hide resolved
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
internal/xds/translator/testdata/out/xds-ir/tracing-endpoint-stats.clusters.yaml
Outdated
Show resolved
Hide resolved
return nil, err | ||
} | ||
al.Destination = ir.RouteDestination{ | ||
Name: fmt.Sprintf("accesslog-%d", idx), // TODO: rename this, so that we can share backend with tracing? |
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.
+1 to this prefix, once we add cluster level features like circuitBreaking
which will live on backendRef
level , we won't be able to reuse tracing-
here
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.
but we should reuse with tracing provider, normally there's only one collector per cluster.
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 may not be possible to reuse if we decide to put features inside backendRef
field, if feature live in top level policy, it may be possible
var port uint32 | ||
if tracing.Provider.Host != nil { | ||
host, port = *tracing.Provider.Host, uint32(tracing.Provider.Port) | ||
// TODO: how to get authority from the backendRefs? |
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.
name.namespace ?
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.
what about a service outside of cluster.
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.
yah that we'd need to add an explicit field in the future
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3293 +/- ##
==========================================
- Coverage 67.37% 67.26% -0.12%
==========================================
Files 166 166
Lines 19357 19438 +81
==========================================
+ Hits 13041 13074 +33
- Misses 5376 5421 +45
- Partials 940 943 +3 ☔ View full report in Codecov by Sentry. |
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
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, thanks !
fix: #3161