mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
add label and labelpresent for endpointslice role in k8s discovery
Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
This commit is contained in:
parent
92d6980360
commit
866fa25b20
10 changed files with 134 additions and 158 deletions
|
@ -274,9 +274,11 @@ func (e *EndpointSlice) buildEndpointSlice(eps endpointSliceAdaptor) *targetgrou
|
|||
}
|
||||
tg.Labels = model.LabelSet{
|
||||
namespaceLabel: lv(eps.namespace()),
|
||||
endpointSliceNameLabel: lv(eps.name()),
|
||||
endpointSliceAddressTypeLabel: lv(eps.addressType()),
|
||||
}
|
||||
|
||||
addObjectMetaLabels(tg.Labels, eps.getObjectMeta(), RoleEndpointSlice)
|
||||
|
||||
e.addServiceLabels(eps, tg)
|
||||
|
||||
type podEntry struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue