From af40dfc2bf614aeb4191916cc2420068696eb776 Mon Sep 17 00:00:00 2001 From: José Guilherme Vanz Date: Tue, 29 Jun 2021 16:39:11 -0300 Subject: --infra-name command line argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the new --infra-name command line argument allowing users to define the name of the infra container Issue #10794 Signed-off-by: José Guilherme Vanz --- pkg/specgen/generate/pod_create.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/specgen/generate') diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go index 4ffd8a37f..aab29499e 100644 --- a/pkg/specgen/generate/pod_create.go +++ b/pkg/specgen/generate/pod_create.go @@ -98,6 +98,10 @@ func createPodOptions(p *specgen.PodSpecGenerator, rt *libpod.Runtime) ([]libpod options = append(options, libpod.WithInfraImage(p.InfraImage)) } + if len(p.InfraName) > 0 { + options = append(options, libpod.WithInfraName(p.InfraName)) + } + if len(p.InfraCommand) > 0 { options = append(options, libpod.WithInfraCommand(p.InfraCommand)) } -- cgit v1.2.3-54-g00ecf