Exclude service itself when checking conflict.
This commit is contained in:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user