add label and labelpresent for endpointslice role in k8s discovery

Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
This commit is contained in:
renzheng.wang 2023-05-30 20:13:00 +08:00
parent 92d6980360
commit 866fa25b20
10 changed files with 134 additions and 158 deletions

View file

@ -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 {