Endpoint.Namespace is not being set when it has no resolved pods

This commit is contained in:
derekwaynecarr
2014-11-24 14:15:22 -05:00
parent 10cf639596
commit 039af4a569

View File

@@ -67,7 +67,9 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
if len(endpoints.Name) == 0 { if len(endpoints.Name) == 0 {
return nil, fmt.Errorf("id is required: %#v", obj) 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) api.FillObjectMetaSystemFields(ctx, &endpoints.ObjectMeta)
return apiserver.MakeAsync(func() (runtime.Object, error) { return apiserver.MakeAsync(func() (runtime.Object, error) {