mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
prevent fieldManager admission from wrapping nil
This commit is contained in:
parent
ba2f6104f6
commit
22dfa6ae1b
@ -32,6 +32,9 @@ const InvalidManagedFieldsAfterMutatingAdmissionWarningFormat = ".metadata.manag
|
|||||||
// NewManagedFieldsValidatingAdmissionController validates the managedFields after calling
|
// NewManagedFieldsValidatingAdmissionController validates the managedFields after calling
|
||||||
// the provided admission and resets them to their original state if they got changed to an invalid value
|
// the provided admission and resets them to their original state if they got changed to an invalid value
|
||||||
func NewManagedFieldsValidatingAdmissionController(wrap admission.Interface) admission.Interface {
|
func NewManagedFieldsValidatingAdmissionController(wrap admission.Interface) admission.Interface {
|
||||||
|
if wrap == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return &managedFieldsValidatingAdmissionController{wrap: wrap}
|
return &managedFieldsValidatingAdmissionController{wrap: wrap}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user