@@ -21,7 +21,6 @@ import (
2121 "sync"
2222 "time"
2323
24- corev1 "k8s.io/api/core/v1"
2524 "k8s.io/apimachinery/pkg/types"
2625 "sigs.k8s.io/controller-runtime/pkg/log"
2726
@@ -45,7 +44,7 @@ type PoolInfo interface {
4544// providing methods to allocate and retire endpoints. This can potentially be used for
4645// pooled memory or other management chores in the implementation.
4746type EndpointFactory interface {
48- NewEndpoint (parent context.Context , inpod * corev1. Pod , poolinfo PoolInfo ) Endpoint
47+ NewEndpoint (parent context.Context , inpod * PodInfo , poolinfo PoolInfo ) Endpoint
4948 ReleaseEndpoint (ep Endpoint )
5049}
5150
@@ -70,8 +69,8 @@ func NewEndpointFactory(sources []DataSource, refreshMetricsInterval time.Durati
7069// NewEndpoint implements EndpointFactory.NewEndpoint.
7170// Creates a new endpoint and starts its associated collector with its own ticker.
7271// Guards against multiple concurrent calls for the same endpoint.
73- func (lc * EndpointLifecycle ) NewEndpoint (parent context.Context , inpod * corev1. Pod , _ PoolInfo ) Endpoint {
74- key := types.NamespacedName {Namespace : inpod .Namespace , Name : inpod .Name }
72+ func (lc * EndpointLifecycle ) NewEndpoint (parent context.Context , inpod * PodInfo , _ PoolInfo ) Endpoint {
73+ key := types.NamespacedName {Namespace : inpod .GetNamespacedName (). Namespace , Name : inpod . GetNamespacedName () .Name }
7574 logger := log .FromContext (parent ).WithValues ("pod" , key )
7675
7776 if _ , ok := lc .collectors .Load (key ); ok {
0 commit comments