mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
discovery/kubernetes: Warn user in case of endpoint over-capacity
Signed-off-by: akatsadimas <nkatsadim@gmail.com>
This commit is contained in:
parent
b878527151
commit
dd2e666a8d
|
@ -322,6 +322,14 @@ func (e *EndpointSlice) buildEndpointSlice(eps *disv1beta1.EndpointSlice) *targe
|
|||
}
|
||||
}
|
||||
|
||||
v := eps.Labels[apiv1.EndpointsOverCapacity]
|
||||
if v == "truncated" {
|
||||
level.Warn(e.logger).Log("msg", "Number of endpoints in one Endpoints object truncated to 1000", "endpoint", eps.Name)
|
||||
}
|
||||
if v == "warning" {
|
||||
level.Warn(e.logger).Log("msg", "Number of endpoints in one Endpoints object exceeds 1000", "endpoint", eps.Name)
|
||||
}
|
||||
|
||||
// For all seen pods, check all container ports. If they were not covered
|
||||
// by one of the service endpoints, generate targets for them.
|
||||
for _, pe := range seenPods {
|
||||
|
|
Loading…
Reference in a new issue