mirror of
https://github.com/containers/podman.git
synced 2025-12-09 07:09:03 +08:00
Vendor c/common changes
Vendor latest c/common with changes to add a new Farms table to containers.conf and update system connection to add a connection to a farm when --farm is set. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
14
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
14
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -79,6 +79,8 @@ type Config struct {
|
||||
Secrets SecretConfig `toml:"secrets"`
|
||||
// ConfigMap section defines configurations for the configmaps management
|
||||
ConfigMaps ConfigMapConfig `toml:"configmaps"`
|
||||
// Farms defines configurations for the buildfarm farms
|
||||
Farms FarmConfig `toml:"farms"`
|
||||
}
|
||||
|
||||
// ContainersConfig represents the "containers" TOML config table
|
||||
@@ -676,6 +678,14 @@ type MachineConfig struct {
|
||||
Provider string `toml:"provider,omitempty"`
|
||||
}
|
||||
|
||||
// FarmConfig represents the "farm" TOML config tabls
|
||||
type FarmConfig struct {
|
||||
// Default is the default farm to be used when farming out builds
|
||||
Default string `toml:"default,omitempty"`
|
||||
// List is a map of farms created where key=farm-name and value=list of connections
|
||||
List map[string][]string `toml:"list,omitempty"`
|
||||
}
|
||||
|
||||
// Destination represents destination for remote service
|
||||
type Destination struct {
|
||||
// URI, required. Example: ssh://root@example.com:22/run/podman/podman.sock
|
||||
@@ -1241,6 +1251,10 @@ func ReadCustomConfig() (*Config, error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
// Let's always initialize the farm list so it is never nil
|
||||
if newConfig.Farms.List == nil {
|
||||
newConfig.Farms.List = make(map[string][]string)
|
||||
}
|
||||
return newConfig, nil
|
||||
}
|
||||
|
||||
|
||||
8
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
8
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -798,3 +798,11 @@ default_sysctls = [
|
||||
# TOML does not provide a way to end a table other than a further table being
|
||||
# defined, so every key hereafter will be part of [machine] and not the
|
||||
# main config.
|
||||
|
||||
[farms]
|
||||
#
|
||||
# the default farm to use when farming out builds
|
||||
# default = ""
|
||||
#
|
||||
# map of existing farms
|
||||
#[farms.list]
|
||||
|
||||
8
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
8
vendor/github.com/containers/common/pkg/config/containers.conf-freebsd
generated
vendored
@@ -660,3 +660,11 @@ default_sysctls = [
|
||||
# TOML does not provide a way to end a table other than a further table being
|
||||
# defined, so every key hereafter will be part of [machine] and not the
|
||||
# main config.
|
||||
|
||||
[farms]
|
||||
#
|
||||
# the default farm to use when farming out builds
|
||||
# default = ""
|
||||
#
|
||||
# map of existing farms
|
||||
#[farms.list]
|
||||
|
||||
9
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
9
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -234,6 +234,7 @@ func DefaultConfig() (*Config, error) {
|
||||
Engine: *defaultEngineConfig,
|
||||
Secrets: defaultSecretConfig(),
|
||||
Machine: defaultMachineConfig(),
|
||||
Farms: defaultFarmConfig(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -257,6 +258,14 @@ func defaultMachineConfig() MachineConfig {
|
||||
}
|
||||
}
|
||||
|
||||
// defaultFarmConfig returns the default farms configuration.
|
||||
func defaultFarmConfig() FarmConfig {
|
||||
emptyList := make(map[string][]string)
|
||||
return FarmConfig{
|
||||
List: emptyList,
|
||||
}
|
||||
}
|
||||
|
||||
// defaultConfigFromMemory returns a default engine configuration. Note that the
|
||||
// config is different for root and rootless. It also parses the storage.conf.
|
||||
func defaultConfigFromMemory() (*EngineConfig, error) {
|
||||
|
||||
Reference in New Issue
Block a user