Add support for Namespace as Kind
Add example for using namespaces
This commit is contained in:
@@ -72,7 +72,7 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("not an event object: %#v", obj)
|
||||
}
|
||||
if api.Namespace(ctx) != "" {
|
||||
if api.NamespaceValue(ctx) != "" {
|
||||
if !api.ValidNamespace(ctx, &event.ObjectMeta) {
|
||||
return nil, errors.NewConflict("event", event.Namespace, fmt.Errorf("event.namespace does not match the provided context"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user