Ignore changes to creation timestamp from clients on update
CreationTimestamp is not an authoritative field (like UID) so mismatches can be safely ignored.
This commit is contained in:
@@ -219,7 +219,10 @@ func ValidateObjectMetaUpdate(old, meta *api.ObjectMeta) errs.ValidationErrorLis
|
||||
if len(meta.UID) == 0 {
|
||||
meta.UID = old.UID
|
||||
}
|
||||
if meta.CreationTimestamp.IsZero() {
|
||||
// ignore changes to timestamp
|
||||
if old.CreationTimestamp.IsZero() {
|
||||
old.CreationTimestamp = meta.CreationTimestamp
|
||||
} else {
|
||||
meta.CreationTimestamp = old.CreationTimestamp
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user