parse: allow extra options for idmap

allow to pass extra information for idmap down to the OCI runtime.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2022-02-14 17:33:00 +01:00
parent bdd89a50af
commit 5eef1234ed
1 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,10 @@ func ValidateVolumeOpts(options []string) ([]string, error) {
finalOpts = append(finalOpts, opt)
continue
}
if strings.HasPrefix(opt, "idmap") {
finalOpts = append(finalOpts, opt)
continue
}
switch opt {
case "noexec", "exec":
@ -84,7 +88,6 @@ func ValidateVolumeOpts(options []string) ([]string, error) {
// are intended to be always safe to use, even not on OS
// X).
continue
case "idmap":
default:
return nil, errors.Errorf("invalid option type %q", opt)
}