Add validation options for PersistentVolumes
These options provide an extensible way of configuring how PVs are validated
This commit is contained in:
@@ -192,7 +192,8 @@ func validateVolumeAttachmentSource(source *storage.VolumeAttachmentSource, fldP
|
||||
allErrs = append(allErrs, field.Required(fldPath.Child("persistentVolumeName"), "must specify non empty persistentVolumeName"))
|
||||
}
|
||||
case source.InlineVolumeSpec != nil:
|
||||
allErrs = append(allErrs, apivalidation.ValidatePersistentVolumeSpec(source.InlineVolumeSpec, "", true, fldPath.Child("inlineVolumeSpec"))...)
|
||||
opts := apivalidation.PersistentVolumeSpecValidationOptions{}
|
||||
allErrs = append(allErrs, apivalidation.ValidatePersistentVolumeSpec(source.InlineVolumeSpec, "", true, fldPath.Child("inlineVolumeSpec"), opts)...)
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
Reference in New Issue
Block a user