Skip to content

Commit 6167229

Browse files
Add comments.
1 parent d02f35f commit 6167229

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

containerd/containerd.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ func (d *Driver) createContainer(image containerd.Image, containerName, containe
123123
opts = append(opts, oci.WithMounts(mounts))
124124
}
125125

126+
// nomad use CNI plugins e.g bridge to setup a network (and network namespace) for the container.
127+
// CNI plugins need to be installed under /opt/cni/bin.
128+
// network namespace is created at /var/run/netns/<id>.
129+
// netnsPath is the path to the network namespace, which containerd joins to provide network
130+
// for the container.
131+
// NOTE: Only bridge networking mode is supported at this point.
126132
if netnsPath != "" {
127133
opts = append(opts, oci.WithLinuxNamespace(specs.LinuxNamespace{Type: specs.NetworkNamespace, Path: netnsPath}))
128134
}

0 commit comments

Comments
 (0)