summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-22 14:18:45 +0000
committerGitHub <noreply@github.com>2021-10-22 14:18:45 +0000
commit5dd211f91b4dfe736056551b2804edb6f978a659 (patch)
treeb8e2512dfed285281200887799ab796d1d6eee12 /libpod/container_internal.go
parent833d92d7092c86cd8c31a72423634fb8b8cfad9a (diff)
parent087f8fc73bec664a30dcf0757cd3cb44ea150582 (diff)
downloadpodman-5dd211f91b4dfe736056551b2804edb6f978a659.tar.gz
podman-5dd211f91b4dfe736056551b2804edb6f978a659.tar.bz2
podman-5dd211f91b4dfe736056551b2804edb6f978a659.zip
Merge pull request #11991 from rhatdan/size
Allow API to specify size and inode quota
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 43f5398a2..994ffeec7 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -445,6 +445,18 @@ func (c *Container) setupStorage(ctx context.Context) error {
},
LabelOpts: c.config.LabelOpts,
}
+
+ nopts := len(c.config.StorageOpts)
+ if nopts > 0 {
+ options.StorageOpt = make(map[string]string, nopts)
+ for _, opt := range c.config.StorageOpts {
+ split2 := strings.SplitN(opt, "=", 2)
+ if len(split2) > 2 {
+ return errors.Wrapf(define.ErrInvalidArg, "invalid storage options %q for %s", opt, c.ID())
+ }
+ options.StorageOpt[split2[0]] = split2[1]
+ }
+ }
if c.restoreFromCheckpoint && !c.config.Privileged {
// If restoring from a checkpoint, the root file-system
// needs to be mounted with the same SELinux labels as