Follow the conventions for namespace naming set out by other projects,
such as linuxkit and cri-containerd. Typically, they are some sort of
host name, with a subdomain describing functionality of the namespace.
In the case of linuxkit, services are launched in `services.linuxkit`.
In cri-containerd, pods are launched in `k8s.io`, making it clear that
these are from kubernetes.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
| ... | ... |
@@ -62,8 +62,8 @@ import ( |
| 62 | 62 |
"github.com/pkg/errors" |
| 63 | 63 |
) |
| 64 | 64 |
|
| 65 |
-// MainNamespace is the name of the namespace used for users containers |
|
| 66 |
-const MainNamespace = "moby" |
|
| 65 |
+// ContainersNamespace is the name of the namespace used for users containers |
|
| 66 |
+const ContainersNamespace = "moby" |
|
| 67 | 67 |
|
| 68 | 68 |
var ( |
| 69 | 69 |
errSystemNotSupported = errors.New("the Docker daemon is not supported on this platform")
|
| ... | ... |
@@ -890,7 +890,7 @@ func NewDaemon(config *config.Config, registryService registry.Service, containe |
| 890 | 890 |
|
| 891 | 891 |
go d.execCommandGC() |
| 892 | 892 |
|
| 893 |
- d.containerd, err = containerdRemote.NewClient(MainNamespace, d) |
|
| 893 |
+ d.containerd, err = containerdRemote.NewClient(ContainersNamespace, d) |
|
| 894 | 894 |
if err != nil {
|
| 895 | 895 |
return nil, err |
| 896 | 896 |
} |
| ... | ... |
@@ -1451,7 +1451,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec |
| 1451 | 1451 |
|
| 1452 | 1452 |
// kill the container |
| 1453 | 1453 |
icmd.RunCommand(ctrBinary, "--address", "/var/run/docker/containerd/docker-containerd.sock", |
| 1454 |
- "--namespace", moby_daemon.MainNamespace, "tasks", "kill", id).Assert(c, icmd.Success) |
|
| 1454 |
+ "--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", id).Assert(c, icmd.Success) |
|
| 1455 | 1455 |
|
| 1456 | 1456 |
// restart daemon. |
| 1457 | 1457 |
d.Restart(c) |
| ... | ... |
@@ -2011,7 +2011,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithKilledRunningContainer(t *check |
| 2011 | 2011 |
|
| 2012 | 2012 |
// kill the container |
| 2013 | 2013 |
icmd.RunCommand(ctrBinary, "--address", "/var/run/docker/containerd/docker-containerd.sock", |
| 2014 |
- "--namespace", moby_daemon.MainNamespace, "tasks", "kill", cid).Assert(t, icmd.Success) |
|
| 2014 |
+ "--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", cid).Assert(t, icmd.Success) |
|
| 2015 | 2015 |
|
| 2016 | 2016 |
// Give time to containerd to process the command if we don't |
| 2017 | 2017 |
// the exit event might be received after we do the inspect |
| ... | ... |
@@ -2106,7 +2106,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che |
| 2106 | 2106 |
result := icmd.RunCommand( |
| 2107 | 2107 |
ctrBinary, |
| 2108 | 2108 |
"--address", "/var/run/docker/containerd/docker-containerd.sock", |
| 2109 |
- "--namespace", moby_daemon.MainNamespace, |
|
| 2109 |
+ "--namespace", moby_daemon.ContainersNamespace, |
|
| 2110 | 2110 |
"tasks", "resume", cid) |
| 2111 | 2111 |
result.Assert(t, icmd.Success) |
| 2112 | 2112 |
|
| ... | ... |
@@ -16,7 +16,7 @@ import ( |
| 16 | 16 |
) |
| 17 | 17 |
|
| 18 | 18 |
// PluginNamespace is the name used for the plugins namespace |
| 19 |
-var PluginNamespace = "moby-plugins" |
|
| 19 |
+var PluginNamespace = "plugins.moby" |
|
| 20 | 20 |
|
| 21 | 21 |
// ExitHandler represents an object that is called when the exit event is received from containerd |
| 22 | 22 |
type ExitHandler interface {
|