Adding option to configure cgroup to start cri-containerd

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
This commit is contained in:
Abhinandan Prativadi
2017-08-29 15:14:10 -07:00
parent 80b57f54a6
commit e1edeae4c9
78 changed files with 10680 additions and 2 deletions

View File

@@ -46,6 +46,7 @@ func main() {
o.NetworkPluginConfDir,
o.StreamServerAddress,
o.StreamServerPort,
o.CgroupPath,
)
if err != nil {
glog.Exitf("Failed to create CRI containerd service %+v: %v", o, err)

View File

@@ -44,6 +44,8 @@ type CRIContainerdOptions struct {
StreamServerAddress string
// StreamServerPort is the port streaming server is listening on.
StreamServerPort string
// CgroupPath is the path for the cgroup that cri-containerd is placed in.
CgroupPath string
}
// NewCRIContainerdOptions returns a reference to CRIContainerdOptions
@@ -71,6 +73,7 @@ func (c *CRIContainerdOptions) AddFlags(fs *pflag.FlagSet) {
"", "The ip address streaming server is listening on. Default host interface is used if this is empty.")
fs.StringVar(&c.StreamServerPort, "stream-port",
"10010", "The port streaming server is listening on.")
fs.StringVar(&c.CgroupPath, "cgroup-path", "", "The cgroup that cri-containerd is part of. By default cri-containerd is not placed in a cgroup")
}
// InitFlags must be called after adding all cli options flags are defined and