
Is your feature request related to a problem? Please describe.
Currently, service->pod mappings not handled by endpoint-controller or endpointslice-controller.k8s.io are not enumerated in the pod list when selecting the service in the service view. This means that stackgres (which implements its own endpoint manager) pods can't be enumerated this way
Describe the solution you'd like
Since the endpointslice-controller syncs endpoints into endpoint slices for backwards compatibility, we can leverage the kubernetes.io/service-name label Selector to list endpointSlices associated with a service, regardless of whom created the specific endpoint or endpoint slices. From there, we can use the targetRef spec to identify all pods associated with a service. As a fallback, if for some reason no pods are found, fall back to the previous labelSelector behavior. This allows users without the RBAC ability to list EndpointSlices to still function the same as before.
Describe alternatives you've considered
While we could implement scanning both Endpoints and EndpointSlices, the backwards compatibility behavior of the endpoint-slice controller should make this more expensive in terms of lookups for no reason
Additional context
Since we have the ability to view logs of all pods backing a service, we should ensure we wire this behavior in as well.
Is your feature request related to a problem? Please describe.
Currently, service->pod mappings not handled by endpoint-controller or endpointslice-controller.k8s.io are not enumerated in the pod list when selecting the service in the service view. This means that stackgres (which implements its own endpoint manager) pods can't be enumerated this way
Describe the solution you'd like
Since the endpointslice-controller syncs endpoints into endpoint slices for backwards compatibility, we can leverage the
kubernetes.io/service-namelabel Selector to list endpointSlices associated with a service, regardless of whom created the specific endpoint or endpoint slices. From there, we can use the targetRef spec to identify all pods associated with a service. As a fallback, if for some reason no pods are found, fall back to the previous labelSelector behavior. This allows users without the RBAC ability to list EndpointSlices to still function the same as before.Describe alternatives you've considered
While we could implement scanning both Endpoints and EndpointSlices, the backwards compatibility behavior of the endpoint-slice controller should make this more expensive in terms of lookups for no reason
Additional context
Since we have the ability to view logs of all pods backing a service, we should ensure we wire this behavior in as well.