nri: add experimental NRI plugin.

Add a common NRI 'service' plugin. It takes care of relaying
requests and respones to and from NRI (external NRI plugins)
and the high-level containerd namespace-independent logic of
applying NRI container adjustments and updates to actual CRI
and other containers.

The namespace-dependent details of the necessary container
manipulation operations are to be implemented by namespace-
specific adaptations. This NRI plugin defines the API which
such adaptations need to implement.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
This commit is contained in:
Krisztian Litkey
2022-08-31 16:10:24 +03:00
parent e0be97ccee
commit 43704ca888
118 changed files with 12178 additions and 10066 deletions

View File

@@ -123,6 +123,13 @@ func (g *Generator) initConfigLinuxResourcesPids() {
}
}
func (g *Generator) initConfigLinuxResourcesUnified() {
g.initConfigLinuxResources()
if g.Config.Linux.Resources.Unified == nil {
g.Config.Linux.Resources.Unified = map[string]string{}
}
}
func (g *Generator) initConfigSolaris() {
g.initConfig()
if g.Config.Solaris == nil {
@@ -185,24 +192,3 @@ func (g *Generator) initConfigVM() {
g.Config.VM = &rspec.VM{}
}
}
func (g *Generator) initConfigVMHypervisor() {
g.initConfigVM()
if &g.Config.VM.Hypervisor == nil {
g.Config.VM.Hypervisor = rspec.VMHypervisor{}
}
}
func (g *Generator) initConfigVMKernel() {
g.initConfigVM()
if &g.Config.VM.Kernel == nil {
g.Config.VM.Kernel = rspec.VMKernel{}
}
}
func (g *Generator) initConfigVMImage() {
g.initConfigVM()
if &g.Config.VM.Image == nil {
g.Config.VM.Image = rspec.VMImage{}
}
}