Skip to content

Commit

Permalink
Merge pull request #678 from vikas-goel/prepare-volume
Browse files Browse the repository at this point in the history
User option to prepare container after creation for volume copy-up.
  • Loading branch information
openshift-merge-robot authored Jul 15, 2021
2 parents b15e2ff + 199d5a4 commit 383a7e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ Options are:
Maximum number of processes allowed in a container. 0 indicates that no limit
is imposed.

**prepare_volume_on_create**=false

Copy the content from the underlying image into the newly created volume when the container is created instead of when it is started. If `false`, the container engine will not copy the content until the container is started. Setting it to `true` may have negative performance implications.

**rootless_networking**="slirp4netns"

Set type of networking rootless containers should use. Valid options are `slirp4netns`
Expand Down
7 changes: 7 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ type ContainersConfig struct {
// PidNS indicates how to create a pid namespace for the container
PidNS string `toml:"pidns,omitempty"`

// Copy the content from the underlying image into the newly created
// volume when the container is created instead of when it is started.
// If false, the container engine will not copy the content until
// the container is started. Setting it to true may have negative
// performance implications.
PrepareVolumeOnCreate bool `toml:"prepare_volume_on_create,omitempty"`

// RootlessNetworking depicts the "kind" of networking for rootless
// containers. Valid options are `slirp4netns` and `cni`. Default is
// `slirp4netns`
Expand Down
7 changes: 7 additions & 0 deletions pkg/config/containers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ default_sysctls = [
#
# pids_limit = 2048

# Copy the content from the underlying image into the newly created volume
# when the container is created instead of when it is started. If false,
# the container engine will not copy the content until the container is started.
# Setting it to true may have negative performance implications.
#
# prepare_volume_on_create = false

# Indicates the networking to be used for rootless containers
# rootless_networking = "slirp4netns"

Expand Down

0 comments on commit 383a7e3

Please sign in to comment.