From 1b4e7aa0488ad086ca38071a77925c90a48a7bc1 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 --- pkg/parse/parse.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/parse/parse.go b/pkg/parse/parse.go index 5d826e805..e73d44287 100644 --- a/pkg/parse/parse.go +++ b/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) }