Exclude service itself when checking conflict.

This commit is contained in:
Deyuan Deng
2014-11-15 10:40:40 -05:00
parent 29b73cc4b5
commit 241f3d702b
3 changed files with 11 additions and 2 deletions

View File

@@ -82,7 +82,6 @@ func reloadIPsFromStorage(ipa *ipAllocator, registry Registry) {
}
func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error) {
service := obj.(*api.Service)
if !api.ValidNamespace(ctx, &service.ObjectMeta) {
return nil, errors.NewConflict("service", service.Namespace, fmt.Errorf("Service.Namespace does not match the provided context"))