summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-15 11:02:36 +0000
committerGitHub <noreply@github.com>2021-08-15 11:02:36 +0000
commit5592ac9e236191da654619d1c8505420187766b4 (patch)
tree8c912ac25388be644b04082d09ac73f75768c67e /cmd/podman
parent94886d4abad7787cb920614ed26955ca36b13846 (diff)
parentbef26f2582733c23957a863bc0769a618ab773a8 (diff)
downloadpodman-5592ac9e236191da654619d1c8505420187766b4.tar.gz
podman-5592ac9e236191da654619d1c8505420187766b4.tar.bz2
podman-5592ac9e236191da654619d1c8505420187766b4.zip
Merge pull request #11219 from baude/oneshottoonce
rename oneshot initcontainers to once
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/create.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 906ae4452..a57488af2 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -13,6 +13,7 @@ import (
"github.com/containers/podman/v3/cmd/podman/common"
"github.com/containers/podman/v3/cmd/podman/registry"
"github.com/containers/podman/v3/cmd/podman/utils"
+ "github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/specgen"
"github.com/containers/podman/v3/pkg/util"
@@ -105,8 +106,8 @@ func create(cmd *cobra.Command, args []string) error {
if !cmd.Flags().Changed("pod") {
return errors.New("must specify pod value with init-ctr")
}
- if !util.StringInSlice(initctr, []string{"always", "oneshot"}) {
- return errors.New("init-ctr value must be 'always' or 'oneshot'")
+ if !util.StringInSlice(initctr, []string{define.AlwaysInitContainer, define.OneShotInitContainer}) {
+ return errors.Errorf("init-ctr value must be '%s' or '%s'", define.AlwaysInitContainer, define.OneShotInitContainer)
}
cliVals.InitContainerType = initctr
}