add work namespace/name annotations in the eps
Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
parent
2ad9cbb694
commit
dca46571fe
|
@ -163,6 +163,10 @@ func (c *EndpointSliceController) collectEndpointSliceFromWork(work *workv1alpha
|
|||
discoveryv1.LabelServiceName: names.GenerateDerivedServiceName(work.Labels[util.ServiceNameLabel]),
|
||||
util.ManagedByKarmadaLabel: util.ManagedByKarmadaLabelValue,
|
||||
})
|
||||
desiredEndpointSlice.Annotations = util.DedupeAndMergeAnnotations(desiredEndpointSlice.Annotations, map[string]string{
|
||||
workv1alpha2.WorkNamespaceAnnotation: work.Namespace,
|
||||
workv1alpha2.WorkNameAnnotation: work.Name,
|
||||
})
|
||||
|
||||
if err = helper.CreateOrUpdateEndpointSlice(c.Client, desiredEndpointSlice); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue