remove IsAbs validation on local volume

use MakeAbsolutePath to convert path in Windows

fix test error: allow relative path for local volume

fix comments

fix comments and add windows unit tests
This commit is contained in:
andyzhangx
2018-04-02 09:09:40 +00:00
parent 2bf111a619
commit 520b8d49fc
10 changed files with 165 additions and 118 deletions

View File

@@ -1383,9 +1383,6 @@ func validateLocalVolumeSource(ls *core.LocalVolumeSource, fldPath *field.Path)
return allErrs
}
if !path.IsAbs(ls.Path) {
allErrs = append(allErrs, field.Invalid(fldPath, ls.Path, "must be an absolute path"))
}
allErrs = append(allErrs, validatePathNoBacksteps(ls.Path, fldPath.Child("path"))...)
return allErrs
}