Merge pull request #7129 from junnplus/namespace-service
fix incorrect namespace of event when create/update namespace
This commit is contained in:
commit
beabd3d5d1
@ -135,6 +135,7 @@ func (l *local) Create(ctx context.Context, req *api.CreateNamespaceRequest, _ .
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
ctx = namespaces.WithNamespace(ctx, req.Namespace.Name)
|
||||
if err := l.publisher.Publish(ctx, "/namespaces/create", &eventstypes.NamespaceCreate{
|
||||
Name: req.Namespace.Name,
|
||||
Labels: req.Namespace.Labels,
|
||||
@ -188,6 +189,7 @@ func (l *local) Update(ctx context.Context, req *api.UpdateNamespaceRequest, _ .
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
ctx = namespaces.WithNamespace(ctx, req.Namespace.Name)
|
||||
if err := l.publisher.Publish(ctx, "/namespaces/update", &eventstypes.NamespaceUpdate{
|
||||
Name: req.Namespace.Name,
|
||||
Labels: req.Namespace.Labels,
|
||||
|
Loading…
Reference in New Issue
Block a user