mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-12 00:47:40 +00:00
Bump github.com/containers/common to v0.14.7
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
parent
579360e862
commit
98a4f89854
7 changed files with 76 additions and 9 deletions
2
go.mod
2
go.mod
|
|
@ -11,7 +11,7 @@ require (
|
|||
github.com/containernetworking/cni v0.7.2-0.20200304161608-4fae32b84921
|
||||
github.com/containernetworking/plugins v0.8.6
|
||||
github.com/containers/buildah v1.15.1
|
||||
github.com/containers/common v0.14.6
|
||||
github.com/containers/common v0.14.7
|
||||
github.com/containers/conmon v2.0.18+incompatible
|
||||
github.com/containers/image/v5 v5.5.2
|
||||
github.com/containers/psgo v1.5.1
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -70,8 +70,8 @@ github.com/containers/buildah v1.15.1 h1:fVYZedNKir1B7qW43KR3zmkjHH+ZAmPoPQix9zH
|
|||
github.com/containers/buildah v1.15.1/go.mod h1:AQPeirYl0bqtXuJaxM9d/xslMm+1qrABc73AEFw0M9U=
|
||||
github.com/containers/common v0.14.0 h1:hiZFDPf6ajKiDmojN5f5X3gboKPO73NLrYb0RXfrQiA=
|
||||
github.com/containers/common v0.14.0/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg=
|
||||
github.com/containers/common v0.14.6 h1:GhMuqWEgH1e2YRXcTUYXOVakgj2srAGBkG1bqmOn+x8=
|
||||
github.com/containers/common v0.14.6/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg=
|
||||
github.com/containers/common v0.14.7 h1:KcyupqUqY9GFnxBck5Ww/tMstbvEmekQys8k8GiYAC0=
|
||||
github.com/containers/common v0.14.7/go.mod h1:9olhlE+WhYof1npnMJdyRMX14/yIUint6zyHzcyRVAg=
|
||||
github.com/containers/conmon v2.0.18+incompatible h1:rjwjNnE756NuXcdE/uUmj4kDbrykslPuBMHI31wh43E=
|
||||
github.com/containers/conmon v2.0.18+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||
github.com/containers/image/v5 v5.4.4/go.mod h1:g7cxNXitiLi6pEr9/L9n/0wfazRuhDKXU15kV86N8h8=
|
||||
|
|
|
|||
57
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
57
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
|
|
@ -195,7 +195,7 @@ type EngineConfig struct {
|
|||
// The first path pointing to a valid file will be used.
|
||||
ConmonPath []string `toml:"conmon_path,omitempty"`
|
||||
|
||||
//DetachKeys is the sequence of keys used to detach a container.
|
||||
// DetachKeys is the sequence of keys used to detach a container.
|
||||
DetachKeys string `toml:"detach_keys,omitempty"`
|
||||
|
||||
// EnablePortReservation determines whether engine will reserve ports on the
|
||||
|
|
@ -266,12 +266,20 @@ type EngineConfig struct {
|
|||
// Indicates whether the application should be running in Remote mode
|
||||
Remote bool `toml:"-"`
|
||||
|
||||
// RemoteURI is deprecated, see ActiveService
|
||||
// RemoteURI containers connection information used to connect to remote system.
|
||||
RemoteURI string `toml:"remote_uri,omitempty"`
|
||||
|
||||
// Identity key file for RemoteURI
|
||||
// RemoteIdentity is deprecated, ServiceDestinations
|
||||
// RemoteIdentity key file for RemoteURI
|
||||
RemoteIdentity string `toml:"remote_identity,omitempty"`
|
||||
|
||||
// ActiveService index to Destinations added v2.0.3
|
||||
ActiveService string `toml:"active_service,omitempty"`
|
||||
|
||||
// Destinations mapped by service Names
|
||||
ServiceDestinations map[string]Destination `toml:"service_destinations,omitempty"`
|
||||
|
||||
// RuntimePath is the path to OCI runtime binary for launching containers.
|
||||
// The first path pointing to a valid file will be used This is used only
|
||||
// when there are no OCIRuntime/OCIRuntimes defined. It is used only to be
|
||||
|
|
@ -387,6 +395,15 @@ type NetworkConfig struct {
|
|||
NetworkConfigDir string `toml:"network_config_dir,omitempty"`
|
||||
}
|
||||
|
||||
// Destination represents destination for remote service
|
||||
type Destination struct {
|
||||
// URI, required. Example: ssh://root@example.com:22/run/podman/podman.sock
|
||||
URI string `toml:"uri"`
|
||||
|
||||
// Identity file with ssh key, optional
|
||||
Identity string `toml:"identity,omitempty"`
|
||||
}
|
||||
|
||||
// NewConfig creates a new Config. It starts with an empty config and, if
|
||||
// specified, merges the config at `userConfigPath` path. Depending if we're
|
||||
// running as root or rootless, we then merge the system configuration followed
|
||||
|
|
@ -872,8 +889,8 @@ func customConfigFile() (string, error) {
|
|||
return OverrideContainersConfig, nil
|
||||
}
|
||||
|
||||
//ReadCustomConfig reads the custom config and only generates a config based on it
|
||||
//If the custom config file does not exists, function will return an empty config
|
||||
// ReadCustomConfig reads the custom config and only generates a config based on it
|
||||
// If the custom config file does not exists, function will return an empty config
|
||||
func ReadCustomConfig() (*Config, error) {
|
||||
path, err := customConfigFile()
|
||||
if err != nil {
|
||||
|
|
@ -930,3 +947,35 @@ func (c *Config) Write() error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reload reloads the configuration from containers.conf files
|
||||
func Reload() (*Config, error) {
|
||||
var err error
|
||||
config, err = NewConfig("")
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "containers.conf reload failed")
|
||||
}
|
||||
return Default()
|
||||
}
|
||||
|
||||
func (c *Config) ActiveDestination() (string, string, error){
|
||||
if uri, found := os.LookupEnv("CONTAINER_HOST"); found {
|
||||
var ident string
|
||||
if v, found := os.LookupEnv("CONTAINER_SSHKEY"); found {
|
||||
ident = v
|
||||
}
|
||||
return uri, ident, nil
|
||||
}
|
||||
|
||||
switch {
|
||||
case c.Engine.ActiveService != "":
|
||||
d, found := c.Engine.ServiceDestinations[c.Engine.ActiveService]
|
||||
if !found {
|
||||
return "", "", errors.Errorf("%q service destination not found", c.Engine.ActiveService)
|
||||
}
|
||||
return d.URI, d.Identity, nil
|
||||
case c.Engine.RemoteURI != "":
|
||||
return c.Engine.RemoteURI, c.Engine.RemoteIdentity, nil
|
||||
}
|
||||
return "", "", errors.New("no service destination configured")
|
||||
}
|
||||
|
|
|
|||
17
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
17
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
|
|
@ -116,6 +116,7 @@
|
|||
#
|
||||
# env = [
|
||||
# "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
# "TERM=xterm",
|
||||
# ]
|
||||
|
||||
# Pass all host environment variables into the container.
|
||||
|
|
@ -367,6 +368,22 @@
|
|||
# Number of seconds to wait for container to exit before sending kill signal.
|
||||
# stop_timeout = 10
|
||||
|
||||
# Index to the active service
|
||||
# active_service = production
|
||||
|
||||
# map of service destinations
|
||||
# [service_destinations]
|
||||
# [service_destinations.production]
|
||||
# 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
|
||||
# uri="ssh://user@production.example.com/run/user/1001/podman/podman.sock"
|
||||
# Path to file containing ssh identity key
|
||||
# identity = "~/.ssh/id_rsa"
|
||||
|
||||
# Paths to look for a valid OCI runtime (runc, runv, kata, etc)
|
||||
[engine.runtimes]
|
||||
# runc = [
|
||||
|
|
|
|||
1
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
1
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
|
|
@ -176,6 +176,7 @@ func DefaultConfig() (*Config, error) {
|
|||
EnableLabeling: selinuxEnabled(),
|
||||
Env: []string{
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"TERM=xterm",
|
||||
},
|
||||
EnvHost: false,
|
||||
HTTPProxy: false,
|
||||
|
|
|
|||
2
vendor/github.com/containers/common/version/version.go
generated
vendored
2
vendor/github.com/containers/common/version/version.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
package version
|
||||
|
||||
// Version is the version of the build.
|
||||
const Version = "0.14.6"
|
||||
const Version = "0.14.7-dev"
|
||||
|
|
|
|||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
|
@ -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.6
|
||||
# github.com/containers/common v0.14.7
|
||||
github.com/containers/common/pkg/apparmor
|
||||
github.com/containers/common/pkg/auth
|
||||
github.com/containers/common/pkg/capabilities
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue