Skip to content

Commit

Permalink
Allow setting quota for individual containers
Browse files Browse the repository at this point in the history
Drivers have the ability to support size and inodes quota, but
we don't allow these options to be passed down to the driver.

With this fix, Podman should be able to support --storage-opt size=
per container.

Helps Fix: containers/podman#11016

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Oct 4, 2021
1 parent 48e2ca0 commit 2970713
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions store.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,11 @@ type ContainerOptions struct {
// container's layer will inherit settings from the image's top layer
// or, if it is not being created based on an image, the Store object.
types.IDMappingOptions
LabelOpts []string
Flags map[string]interface{}
MountOpts []string
Volatile bool
LabelOpts []string
Flags map[string]interface{}
MountOpts []string
Volatile bool
StorageOpt map[string]string
}

type store struct {
Expand Down Expand Up @@ -1384,7 +1385,7 @@ func (s *store) CreateContainer(id string, names []string, image, layer, metadat
options.Flags["MountLabel"] = mountLabel
}

clayer, err := rlstore.Create(layer, imageTopLayer, nil, options.Flags["MountLabel"].(string), nil, layerOptions, true)
clayer, err := rlstore.Create(layer, imageTopLayer, nil, options.Flags["MountLabel"].(string), options.StorageOpt, layerOptions, true)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 2970713

Please sign in to comment.