mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
Enable field wiping on create-via-update and create-via-patch requests
This commit is contained in:
parent
d357ca97bb
commit
6fda3b8046
1 changed files with 4 additions and 0 deletions
|
|
@ -678,6 +678,10 @@ func (e *Store) Update(ctx context.Context, name string, objInfo rest.UpdatedObj
|
|||
if objectMeta, err := meta.Accessor(obj); err != nil {
|
||||
return nil, nil, err
|
||||
} else {
|
||||
// Wipe metadata on create-via-update and create-via-apply
|
||||
// requests to match create behavior. Note that this happens
|
||||
// AFTER preconditions are checked.
|
||||
rest.WipeObjectMetaSystemFields(objectMeta)
|
||||
rest.FillObjectMetaSystemFields(objectMeta)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue