Enable field wiping on create-via-update and create-via-patch requests

This commit is contained in:
Joe Betz 2026-05-08 13:36:13 -04:00
parent d357ca97bb
commit 6fda3b8046
No known key found for this signature in database
GPG key ID: 1E2BA7FEB91911CB

View file

@ -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)
}