mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Vendor in latest containers/(common,image,storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
5
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
5
vendor/github.com/containers/common/libnetwork/netavark/config.go
generated
vendored
@@ -116,6 +116,11 @@ func (n *netavarkNetwork) networkCreate(newNetwork *types.Network, defaultNet bo
|
||||
}
|
||||
// rust only support "true" or "false" while go can parse 1 and 0 as well so we need to change it
|
||||
newNetwork.Options[types.IsolateOption] = strconv.FormatBool(val)
|
||||
case types.MetricOption:
|
||||
_, err := strconv.ParseUint(value, 10, 32)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported bridge network option %s", key)
|
||||
}
|
||||
|
||||
1
vendor/github.com/containers/common/libnetwork/types/const.go
generated
vendored
1
vendor/github.com/containers/common/libnetwork/types/const.go
generated
vendored
@@ -40,6 +40,7 @@ const (
|
||||
MTUOption = "mtu"
|
||||
ModeOption = "mode"
|
||||
IsolateOption = "isolate"
|
||||
MetricOption = "metric"
|
||||
)
|
||||
|
||||
type NetworkBackend string
|
||||
|
||||
13
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
13
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -358,6 +358,9 @@ type EngineConfig struct {
|
||||
// OCIRuntimes are the set of configured OCI runtimes (default is runc).
|
||||
OCIRuntimes map[string][]string `toml:"runtimes,omitempty"`
|
||||
|
||||
// PlatformToOCIRuntime requests specific OCI runtime for a specified platform of image.
|
||||
PlatformToOCIRuntime map[string]string `toml:"platform_to_oci_runtime,omitempty"`
|
||||
|
||||
// PodExitPolicy determines the behaviour when the last container of a pod exits.
|
||||
PodExitPolicy PodExitPolicy `toml:"pod_exit_policy,omitempty"`
|
||||
|
||||
@@ -619,6 +622,16 @@ type Destination struct {
|
||||
IsMachine bool `toml:"is_machine,omitempty"`
|
||||
}
|
||||
|
||||
// Consumes container image's os and arch and returns if any dedicated runtime was
|
||||
// configured otherwise returns default runtime.
|
||||
func (c *EngineConfig) ImagePlatformToRuntime(os string, arch string) string {
|
||||
platformString := os + "/" + arch
|
||||
if val, ok := c.PlatformToOCIRuntime[platformString]; ok {
|
||||
return val
|
||||
}
|
||||
return c.OCIRuntime
|
||||
}
|
||||
|
||||
// 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
|
||||
|
||||
4
vendor/github.com/containers/common/pkg/config/config_darwin.go
generated
vendored
4
vendor/github.com/containers/common/pkg/config/config_darwin.go
generated
vendored
@@ -10,6 +10,10 @@ const (
|
||||
|
||||
// DefaultContainersConfig holds the default containers config path
|
||||
DefaultContainersConfig = "/usr/share/" + _configPath
|
||||
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/etc/containers/policy.json"
|
||||
)
|
||||
|
||||
// podman remote clients on darwin cannot use unshare.isRootless() to determine the configuration file locations.
|
||||
|
||||
4
vendor/github.com/containers/common/pkg/config/config_freebsd.go
generated
vendored
4
vendor/github.com/containers/common/pkg/config/config_freebsd.go
generated
vendored
@@ -10,6 +10,10 @@ const (
|
||||
|
||||
// DefaultContainersConfig holds the default containers config path
|
||||
DefaultContainersConfig = "/usr/local/share/" + _configPath
|
||||
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/usr/local/etc/containers/policy.json"
|
||||
)
|
||||
|
||||
// podman remote clients on freebsd cannot use unshare.isRootless() to determine the configuration file locations.
|
||||
|
||||
4
vendor/github.com/containers/common/pkg/config/config_linux.go
generated
vendored
4
vendor/github.com/containers/common/pkg/config/config_linux.go
generated
vendored
@@ -13,6 +13,10 @@ const (
|
||||
|
||||
// DefaultContainersConfig holds the default containers config path
|
||||
DefaultContainersConfig = "/usr/share/" + _configPath
|
||||
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/etc/containers/policy.json"
|
||||
)
|
||||
|
||||
func selinuxEnabled() bool {
|
||||
|
||||
4
vendor/github.com/containers/common/pkg/config/config_windows.go
generated
vendored
4
vendor/github.com/containers/common/pkg/config/config_windows.go
generated
vendored
@@ -8,6 +8,10 @@ const (
|
||||
|
||||
// DefaultContainersConfig holds the default containers config path
|
||||
DefaultContainersConfig = "/usr/share/" + _configPath
|
||||
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/etc/containers/policy.json"
|
||||
)
|
||||
|
||||
// podman remote clients on windows cannot use unshare.isRootless() to determine the configuration file locations.
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -263,6 +263,11 @@ default_sysctls = [
|
||||
# If it is empty or commented out, no volumes will be added
|
||||
#
|
||||
#volumes = []
|
||||
#
|
||||
#[engine.platform_to_oci_runtime]
|
||||
#"wasi/wasm" = ["crun-wasm"]
|
||||
#"wasi/wasm32" = ["crun-wasm"]
|
||||
#"wasi/wasm64" = ["crun-wasm"]
|
||||
|
||||
[secrets]
|
||||
#driver = "file"
|
||||
|
||||
17
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
17
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -149,9 +149,6 @@ const (
|
||||
DefaultPidsLimit = 2048
|
||||
// DefaultPullPolicy pulls the image if it does not exist locally.
|
||||
DefaultPullPolicy = "missing"
|
||||
// DefaultSignaturePolicyPath is the default value for the
|
||||
// policy.json file.
|
||||
DefaultSignaturePolicyPath = "/etc/containers/policy.json"
|
||||
// DefaultSubnet is the subnet that will be used for the default
|
||||
// network.
|
||||
DefaultSubnet = "10.88.0.0/16"
|
||||
@@ -332,6 +329,15 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
"/bin/crun",
|
||||
"/run/current-system/sw/bin/crun",
|
||||
},
|
||||
"crun-wasm": {
|
||||
"/usr/bin/crun-wasm",
|
||||
"/usr/sbin/crun-wasm",
|
||||
"/usr/local/bin/crun-wasm",
|
||||
"/usr/local/sbin/crun-wasm",
|
||||
"/sbin/crun-wasm",
|
||||
"/bin/crun-wasm",
|
||||
"/run/current-system/sw/bin/crun-wasm",
|
||||
},
|
||||
"runc": {
|
||||
"/usr/bin/runc",
|
||||
"/usr/sbin/runc",
|
||||
@@ -378,6 +384,11 @@ func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
"/usr/local/bin/ocijail",
|
||||
},
|
||||
}
|
||||
c.PlatformToOCIRuntime = map[string]string{
|
||||
"wasi/wasm": "crun-wasm",
|
||||
"wasi/wasm32": "crun-wasm",
|
||||
"wasi/wasm64": "crun-wasm",
|
||||
}
|
||||
// Needs to be called after populating c.OCIRuntimes.
|
||||
c.OCIRuntime = c.findRuntime()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user