Merge pull request #1060 from samuelkarp/namespace-from-env

namespaces: Export env var and default value
This commit is contained in:
Phil Estes
2017-06-21 20:49:33 -04:00
committed by GitHub
4 changed files with 13 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/Sirupsen/logrus"
"github.com/containerd/containerd"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/version"
"github.com/urfave/cli"
)
@@ -48,8 +49,8 @@ containerd CLI
cli.StringFlag{
Name: "namespace, n",
Usage: "namespace to use with commands",
Value: "default",
EnvVar: "CONTAINERD_NAMESPACE",
Value: namespaces.Default,
EnvVar: namespaces.NamespaceEnvVar,
},
}
app.Commands = append([]cli.Command{