summaryrefslogtreecommitdiff
path: root/pkg/specgenutil
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 /pkg/specgenutil
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 'pkg/specgenutil')
-rw-r--r--pkg/specgenutil/specgen.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go
index 8007e5d8e..683cd2918 100644
--- a/pkg/specgenutil/specgen.go
+++ b/pkg/specgenutil/specgen.go
@@ -394,6 +394,17 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions
}
s.Annotations = annotations
+ if len(c.StorageOpts) > 0 {
+ opts := make(map[string]string, len(c.StorageOpts))
+ for _, opt := range c.StorageOpts {
+ split := strings.SplitN(opt, "=", 2)
+ if len(split) != 2 {
+ return errors.Errorf("storage-opt must be formatted KEY=VALUE")
+ }
+ opts[split[0]] = split[1]
+ }
+ s.StorageOpts = opts
+ }
s.WorkDir = c.Workdir
if c.Entrypoint != nil {
entrypoint := []string{}