Open GroovyCarrot opened 2 days ago
Also interested in this, I'd thought that Grafana would have supported endpoint slices at this point. We actually just hit a bug with endpoints that isn't present in EndpointSlices.
Edit: Kubernetes actually shipped a regression that will expose users to stale endpoints values as well if anyone else ends up here because of that: https://github.com/kubernetes/kubernetes/issues/127370
Request
The
prometheus.operator.servicemonitors
component currently only supports the legacyendpoints
discovery resource.Recently support was added to the prometheus operator for the new
endpointslices.discovery.k8s.io
resources: https://github.com/prometheus-operator/prometheus-operator/pull/6672Following the pattern they implemented, would suggest we need a
role = "endpoints|endpointslices"
argument on the component to decide which resource to use for discovery, as they did not opt for a field on the CRD to denote the role.endpointslices are already supported by
discovery.kubernetes
.Use case
This is important as
endpointslices
are far more flexible, supporting FQDNs as well as IP addresses, and offers tenants a way to definestatic_configs
/discovery.relabel
targets via a resource in kubernetes rather than in the agent config itself.