mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-20 22:26:07 +00:00
Restore finalizer and managedFields (#5853)
Restore finalizer and managedFields of metadata during the restoration Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
@@ -146,3 +146,10 @@ func WithGenerateName(val string) func(obj metav1.Object) {
|
||||
obj.SetGenerateName(val)
|
||||
}
|
||||
}
|
||||
|
||||
// WithManagedFields is a functional option that applies the specified managed fields to an object.
|
||||
func WithManagedFields(val []metav1.ManagedFieldsEntry) func(obj metav1.Object) {
|
||||
return func(obj metav1.Object) {
|
||||
obj.SetManagedFields(val)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user