From 5eef1234ed1daa82d67ee5fb5690a5e5863e9a0d Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 14 Feb 2022 17:33:00 +0100 Subject: [PATCH] parse: allow extra options for idmap allow to pass extra information for idmap down to the OCI runtime. Signed-off-by: Giuseppe Scrivano --- common/pkg/parse/parse.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/pkg/parse/parse.go b/common/pkg/parse/parse.go index 5d826e8051..e73d442879 100644 --- a/common/pkg/parse/parse.go +++ b/common/pkg/parse/parse.go @@ -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) }