diff --git a/pkg/registry/core/persistentvolumeclaim/strategy.go b/pkg/registry/core/persistentvolumeclaim/strategy.go index 2500ed1b52a..a35cee7d9a8 100644 --- a/pkg/registry/core/persistentvolumeclaim/strategy.go +++ b/pkg/registry/core/persistentvolumeclaim/strategy.go @@ -122,8 +122,7 @@ func (persistentvolumeclaimStrategy) ValidateUpdate(ctx context.Context, obj, ol newPvc := obj.(*api.PersistentVolumeClaim) oldPvc := old.(*api.PersistentVolumeClaim) opts := validation.ValidationOptionsForPersistentVolumeClaim(newPvc, oldPvc) - errorList := validation.ValidatePersistentVolumeClaim(newPvc, opts) - return append(errorList, validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts)...) + return validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/storage/volumeattachment/strategy.go b/pkg/registry/storage/volumeattachment/strategy.go index 51a064c9edc..a79d7406e2e 100644 --- a/pkg/registry/storage/volumeattachment/strategy.go +++ b/pkg/registry/storage/volumeattachment/strategy.go @@ -99,8 +99,7 @@ func (volumeAttachmentStrategy) PrepareForUpdate(ctx context.Context, obj, old r func (volumeAttachmentStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { newVolumeAttachmentObj := obj.(*storage.VolumeAttachment) oldVolumeAttachmentObj := old.(*storage.VolumeAttachment) - errorList := validation.ValidateVolumeAttachment(newVolumeAttachmentObj) - return append(errorList, validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj)...) + return validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/storage/volumeattributesclass/strategy.go b/pkg/registry/storage/volumeattributesclass/strategy.go index d816c2599e1..f7652bc46a4 100644 --- a/pkg/registry/storage/volumeattributesclass/strategy.go +++ b/pkg/registry/storage/volumeattributesclass/strategy.go @@ -68,8 +68,7 @@ func (volumeAttributesClassStrategy) PrepareForUpdate(ctx context.Context, obj, } func (volumeAttributesClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - errorList := validation.ValidateVolumeAttributesClass(obj.(*storage.VolumeAttributesClass)) - return append(errorList, validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass))...) + return validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass)) } // WarningsOnUpdate returns warnings for the given update.