mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #2570 from derekwaynecarr/endpoints_missing_ns
Endpoint.Namespace is not being set when it has no resolved endpoints
This commit is contained in:
commit
ef85243f73
@ -67,7 +67,9 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
|
||||
if len(endpoints.Name) == 0 {
|
||||
return nil, fmt.Errorf("id is required: %#v", obj)
|
||||
}
|
||||
|
||||
if !api.ValidNamespace(ctx, &endpoints.ObjectMeta) {
|
||||
return nil, errors.NewConflict("endpoints", endpoints.Namespace, fmt.Errorf("Endpoints.Namespace does not match the provided context"))
|
||||
}
|
||||
api.FillObjectMetaSystemFields(ctx, &endpoints.ObjectMeta)
|
||||
|
||||
return apiserver.MakeAsync(func() (runtime.Object, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user