diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-21 05:21:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 05:21:09 -0400 |
commit | 47d99fb6253238e7603fc96d5b9bbb14f1e8c948 (patch) | |
tree | 23f7e52d04fe78df60ba1a94c1ef5e7106ff8e82 /pkg/specgen | |
parent | 8884f6a4f357ea64ad5f20f791ec0a09bdd36352 (diff) | |
parent | 532c7343a9af5fbdcc682f7f93c987b1f1e49b41 (diff) | |
download | podman-47d99fb6253238e7603fc96d5b9bbb14f1e8c948.tar.gz podman-47d99fb6253238e7603fc96d5b9bbb14f1e8c948.tar.bz2 podman-47d99fb6253238e7603fc96d5b9bbb14f1e8c948.zip |
Merge pull request #5647 from rhatdan/containers.conf
Update podmanV2 to use containers.conf
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/pod_validate.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go index 9e9659fa9..f2f90e58d 100644 --- a/pkg/specgen/pod_validate.go +++ b/pkg/specgen/pod_validate.go @@ -1,14 +1,16 @@ package specgen import ( - "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/rootless" + "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" ) var ( // ErrInvalidPodSpecConfig describes an error given when the podspecgenerator is invalid ErrInvalidPodSpecConfig error = errors.New("invalid pod spec") + // containerConfig has the default configurations defined in containers.conf + containerConfig = util.DefaultContainerConfig() ) func exclusivePodOptions(opt1, opt2 string) error { @@ -96,10 +98,10 @@ func (p *PodSpecGenerator) Validate() error { } } if len(p.InfraImage) < 1 { - p.InfraImage = define.DefaultInfraImage + p.InfraImage = containerConfig.Engine.InfraImage } if len(p.InfraCommand) < 1 { - p.InfraCommand = []string{define.DefaultInfraCommand} + p.InfraCommand = []string{containerConfig.Engine.InfraCommand} } return nil } |