summaryrefslogtreecommitdiff
path: root/cmd/podmanV2
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-15 15:00:13 -0700
committerGitHub <noreply@github.com>2020-04-15 15:00:13 -0700
commitc7d17613ec7635413c035e0ed0b8700c56430303 (patch)
tree2eba4ffc3a0e42b15f28f1e98a12a33c14a224f2 /cmd/podmanV2
parent0f7162d791076e736a7cee3a45051925fa4d0589 (diff)
parent30d2964ff83387e3c3fa7447776c57f4342707e6 (diff)
downloadpodman-c7d17613ec7635413c035e0ed0b8700c56430303.tar.gz
podman-c7d17613ec7635413c035e0ed0b8700c56430303.tar.bz2
podman-c7d17613ec7635413c035e0ed0b8700c56430303.zip
Merge pull request #5827 from baude/v2bloat
v2 bloat pruning phase 2
Diffstat (limited to 'cmd/podmanV2')
-rw-r--r--cmd/podmanV2/common/create.go11
-rw-r--r--cmd/podmanV2/common/default.go13
2 files changed, 18 insertions, 6 deletions
diff --git a/cmd/podmanV2/common/create.go b/cmd/podmanV2/common/create.go
index e2eb8cbda..ecaaf38fb 100644
--- a/cmd/podmanV2/common/create.go
+++ b/cmd/podmanV2/common/create.go
@@ -6,7 +6,6 @@ import (
buildahcli "github.com/containers/buildah/pkg/cli"
"github.com/containers/common/pkg/config"
- "github.com/containers/libpod/cmd/podman/cliconfig"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag"
)
@@ -214,22 +213,22 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
)
createFlags.StringVar(
&cf.HealthInterval,
- "health-interval", cliconfig.DefaultHealthCheckInterval,
+ "health-interval", DefaultHealthCheckInterval,
"set an interval for the healthchecks (a value of disable results in no automatic timer setup)",
)
createFlags.UintVar(
&cf.HealthRetries,
- "health-retries", cliconfig.DefaultHealthCheckRetries,
+ "health-retries", DefaultHealthCheckRetries,
"the number of retries allowed before a healthcheck is considered to be unhealthy",
)
createFlags.StringVar(
&cf.HealthStartPeriod,
- "health-start-period", cliconfig.DefaultHealthCheckStartPeriod,
+ "health-start-period", DefaultHealthCheckStartPeriod,
"the initialization time needed for a container to bootstrap",
)
createFlags.StringVar(
&cf.HealthTimeout,
- "health-timeout", cliconfig.DefaultHealthCheckTimeout,
+ "health-timeout", DefaultHealthCheckTimeout,
"the maximum time allowed to complete the healthcheck before an interval is considered failed",
)
createFlags.StringVarP(
@@ -244,7 +243,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
)
createFlags.StringVar(
&cf.ImageVolume,
- "image-volume", cliconfig.DefaultImageVolume,
+ "image-volume", DefaultImageVolume,
`Tells podman how to handle the builtin image volumes ("bind"|"tmpfs"|"ignore")`,
)
createFlags.BoolVar(
diff --git a/cmd/podmanV2/common/default.go b/cmd/podmanV2/common/default.go
index b71fcb6f0..bd793f168 100644
--- a/cmd/podmanV2/common/default.go
+++ b/cmd/podmanV2/common/default.go
@@ -12,6 +12,19 @@ import (
"github.com/opencontainers/selinux/go-selinux"
)
+var (
+ // DefaultHealthCheckInterval default value
+ DefaultHealthCheckInterval = "30s"
+ // DefaultHealthCheckRetries default value
+ DefaultHealthCheckRetries uint = 3
+ // DefaultHealthCheckStartPeriod default value
+ DefaultHealthCheckStartPeriod = "0s"
+ // DefaultHealthCheckTimeout default value
+ DefaultHealthCheckTimeout = "30s"
+ // DefaultImageVolume default value
+ DefaultImageVolume = "bind"
+)
+
// TODO these options are directly embedded into many of the CLI cobra values, as such
// this approach will not work in a remote client. so we will need to likely do something like a
// supported and unsupported approach here and backload these options into the specgen