summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/common/pkg/config/config.go34
-rw-r--r--vendor/github.com/containers/common/pkg/config/config_local.go12
-rw-r--r--vendor/github.com/containers/common/pkg/config/config_remote.go4
-rw-r--r--vendor/github.com/containers/common/pkg/config/containers.conf25
-rw-r--r--vendor/github.com/containers/common/pkg/config/default.go6
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
7 files changed, 66 insertions, 19 deletions
diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go
index d60464739..c652a66f2 100644
--- a/vendor/github.com/containers/common/pkg/config/config.go
+++ b/vendor/github.com/containers/common/pkg/config/config.go
@@ -165,6 +165,9 @@ type ContainersConfig struct {
// ShmSize holds the size of /dev/shm.
ShmSize string `toml:"shm_size,omitempty"`
+ //TZ sets the timezone inside the container
+ TZ string `toml:"tz,omitempty"`
+
// UTSNS indicates how to create a UTS namespace for the container
UTSNS string `toml:"utsns,omitempty"`
@@ -207,6 +210,9 @@ type EngineConfig struct {
// memory.
EnablePortReservation bool `toml:"enable_port_reservation,omitempty"`
+ // Environment variables to be used when running the container engine (e.g., Podman, Buildah). For example "http_proxy=internal.proxy.company.com"
+ Env []string `toml:"env,omitempty"`
+
// EventsLogFilePath is where the events log is stored.
EventsLogFilePath string `toml:"events_logfile_path,omitempty"`
@@ -416,11 +422,10 @@ func NewConfig(userConfigPath string) (*Config, error) {
// Merge changes in later configs with the previous configs.
// Each config file that specified fields, will override the
// previous fields.
- config, err := readConfigFromFile(path, config)
- if err != nil {
+ if err = readConfigFromFile(path, config); err != nil {
return nil, errors.Wrapf(err, "error reading system config %q", path)
}
- logrus.Debugf("Merged system config %q: %v", path, config)
+ logrus.Debugf("Merged system config %q: %+v", path, config)
}
// If the caller specified a config path to use, then we read it to
@@ -429,11 +434,10 @@ func NewConfig(userConfigPath string) (*Config, error) {
var err error
// readConfigFromFile reads in container config in the specified
// file and then merge changes with the current default.
- config, err = readConfigFromFile(userConfigPath, config)
- if err != nil {
+ if err = readConfigFromFile(userConfigPath, config); err != nil {
return nil, errors.Wrapf(err, "error reading user config %q", userConfigPath)
}
- logrus.Debugf("Merged user config %q: %v", userConfigPath, config)
+ logrus.Debugf("Merged user config %q: %+v", userConfigPath, config)
}
config.addCAPPrefix()
@@ -448,13 +452,12 @@ func NewConfig(userConfigPath string) (*Config, error) {
// unmarshal its content into a Config. The config param specifies the previous
// default config. If the path, only specifies a few fields in the Toml file
// the defaults from the config parameter will be used for all other fields.
-func readConfigFromFile(path string, config *Config) (*Config, error) {
+func readConfigFromFile(path string, config *Config) error {
logrus.Debugf("Reading configuration file %q", path)
- _, err := toml.DecodeFile(path, config)
- if err != nil {
- return nil, fmt.Errorf("unable to decode configuration %v: %v", path, err)
+ if _, err := toml.DecodeFile(path, config); err != nil {
+ return errors.Wrapf(err, "unable to decode configuration %v", path)
}
- return config, err
+ return nil
}
// Returns the list of configuration files, if they exist in order of hierarchy.
@@ -465,7 +468,7 @@ func systemConfigs() ([]string, error) {
path := os.Getenv("CONTAINERS_CONF")
if path != "" {
if _, err := os.Stat(path); err != nil {
- return nil, errors.Wrap(err, "failed to stat of %s from CONTAINERS_CONF environment variable")
+ return nil, errors.Wrapf(err, "failed to stat of %s from CONTAINERS_CONF environment variable", path)
}
return append(configs, path), nil
}
@@ -575,6 +578,10 @@ func (c *ContainersConfig) Validate() error {
return err
}
+ if err := c.validateTZ(); err != nil {
+ return err
+ }
+
if c.LogSizeMax >= 0 && c.LogSizeMax < OCIBufSize {
return fmt.Errorf("log size max should be negative or >= %d", OCIBufSize)
}
@@ -892,8 +899,7 @@ func ReadCustomConfig() (*Config, error) {
newConfig := &Config{}
if _, err := os.Stat(path); err == nil {
- newConfig, err = readConfigFromFile(path, newConfig)
- if err != nil {
+ if err = readConfigFromFile(path, newConfig); err != nil {
return nil, err
}
} else {
diff --git a/vendor/github.com/containers/common/pkg/config/config_local.go b/vendor/github.com/containers/common/pkg/config/config_local.go
index 8f4daa3d7..a6ab33c50 100644
--- a/vendor/github.com/containers/common/pkg/config/config_local.go
+++ b/vendor/github.com/containers/common/pkg/config/config_local.go
@@ -76,6 +76,18 @@ func (c *ContainersConfig) validateUlimits() error {
return nil
}
+func (c *ContainersConfig) validateTZ() error {
+ if c.TZ == "local" {
+ return nil
+ }
+ zonePath := filepath.Join("/usr/share/zoneinfo", c.TZ)
+ _, err := os.Stat(zonePath)
+ if err != nil {
+ return fmt.Errorf("Unrecognized timezone %s", zonePath)
+ }
+ return nil
+}
+
func isRemote() bool {
return false
}
diff --git a/vendor/github.com/containers/common/pkg/config/config_remote.go b/vendor/github.com/containers/common/pkg/config/config_remote.go
index d012dbd2f..61dd159ad 100644
--- a/vendor/github.com/containers/common/pkg/config/config_remote.go
+++ b/vendor/github.com/containers/common/pkg/config/config_remote.go
@@ -23,3 +23,7 @@ func (c *ContainersConfig) validateDevices() error {
func (c *ContainersConfig) validateUlimits() error {
return nil
}
+
+func (c *ContainersConfig) validateTZ() error {
+ return nil
+}
diff --git a/vendor/github.com/containers/common/pkg/config/containers.conf b/vendor/github.com/containers/common/pkg/config/containers.conf
index 389479fa5..80afbb9bc 100644
--- a/vendor/github.com/containers/common/pkg/config/containers.conf
+++ b/vendor/github.com/containers/common/pkg/config/containers.conf
@@ -205,6 +205,11 @@
#
# shm_size = "65536k"
+# Set timezone in container. Takes IANA timezones as well as "local",
+# which sets the timezone in the container to match the host machine.
+#
+# tz = ""
+
# Default way to to create a UTS namespace for the container
# Options are:
# `private` Create private UTS Namespace for the container.
@@ -279,6 +284,12 @@
#
# enable_port_reservation = true
+# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
+# For example "http_proxy=internal.proxy.company.com".
+# Note these environment variables will not be used within the container.
+# Set the env section under [containers] table, if you want to set environment variables for the container.
+# env = []
+
# Selects which logging mechanism to use for container engine events.
# Valid values are `journald`, `file` and `none`.
#
@@ -329,6 +340,14 @@
# Whether to pull new image before running a container
# pull_policy = "missing"
+# Default Remote URI to access the Podman service.
+# Examples:
+# rootless "unix://run/user/$UID/podman/podman.sock" (Default)
+# rootfull "unix://run/podman/podman.sock.(Default)
+# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
+# remote rootfull ssh://root@10.10.1.136:22/run/podman/podman.sock
+# remote_uri= ""
+
# Directory for persistent engine files (database, etc)
# By default, this will be configured relative to where the containers/storage
# stores containers
@@ -364,6 +383,9 @@
#
# runtime_supports_kvm = ["kata"]
+# Number of seconds to wait for container to exit before sending kill signal.
+# stop_timeout = 10
+
# Paths to look for a valid OCI runtime (runc, runv, kata, etc)
[engine.runtimes]
# runc = [
@@ -397,9 +419,6 @@
# "/usr/bin/kata-fc",
# ]
-# Number of seconds to wait for container to exit before sending kill signal.
-#stop_timeout = 10
-
# The [engine.runtimes] table MUST be the last entry in this file.
# (Unless another table is added)
# TOML does not provide a way to end a table other than a further table being
diff --git a/vendor/github.com/containers/common/pkg/config/default.go b/vendor/github.com/containers/common/pkg/config/default.go
index fe523cbf5..60811637f 100644
--- a/vendor/github.com/containers/common/pkg/config/default.go
+++ b/vendor/github.com/containers/common/pkg/config/default.go
@@ -191,6 +191,7 @@ func DefaultConfig() (*Config, error) {
PidNS: "private",
SeccompProfile: SeccompDefaultPath,
ShmSize: DefaultShmSize,
+ TZ: "",
UTSNS: "private",
UserNS: "host",
UserNSSize: DefaultUserNSSize,
@@ -498,3 +499,8 @@ func (c *Config) PidsLimit() int64 {
func (c *Config) DetachKeys() string {
return c.Engine.DetachKeys
}
+
+// Tz returns the timezone in the container
+func (c *Config) TZ() string {
+ return c.Containers.TZ
+}
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index 38a45dfb2..bbbca741c 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.14.3"
+const Version = "0.15.1"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index fdc196274..08d0ec7a3 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -84,7 +84,7 @@ github.com/containers/buildah/pkg/secrets
github.com/containers/buildah/pkg/supplemented
github.com/containers/buildah/pkg/umask
github.com/containers/buildah/util
-# github.com/containers/common v0.14.3
+# github.com/containers/common v0.15.1
github.com/containers/common/pkg/apparmor
github.com/containers/common/pkg/auth
github.com/containers/common/pkg/capabilities