Merge pull request #61455 from liggitt/uid-conflict

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Deprecate repair-malformed-updates flag, move object meta mutation into BeforeCreate

closes #23297

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-05-03 13:41:07 -07:00
committed by GitHub
8 changed files with 37 additions and 64 deletions

View File

@@ -344,9 +344,8 @@ func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObj
}
// Copy over non-user fields
// TODO: make this a merge function
if errs := validation.ValidateServiceUpdate(service, oldService); len(errs) > 0 {
return nil, false, errors.NewInvalid(api.Kind("Service"), service.Name, errs)
if err := rest.BeforeUpdate(registry.Strategy, ctx, service, oldService); err != nil {
return nil, false, err
}
// TODO: this should probably move to strategy.PrepareForCreate()