cni: pass in the cgroupPath capability argument
There is a new CNI capability argument, cgroupPath, where runtimes can pass cgroup paths to CNI plugins. Implement that. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
This commit is contained in:
parent
d14758b605
commit
0166783c79
@ -396,6 +396,10 @@ func cniNamespaceOpts(id string, config *runtime.PodSandboxConfig) ([]cni.Namesp
|
|||||||
opts = append(opts, cni.WithCapabilityDNS(*dns))
|
opts = append(opts, cni.WithCapabilityDNS(*dns))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cgroup := config.GetLinux().GetCgroupParent(); cgroup != "" {
|
||||||
|
opts = append(opts, cni.WithCapabilityCgroupPath(cgroup))
|
||||||
|
}
|
||||||
|
|
||||||
return opts, nil
|
return opts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,6 +597,10 @@ func cniNamespaceOpts(id string, config *runtime.PodSandboxConfig) ([]cni.Namesp
|
|||||||
opts = append(opts, cni.WithCapabilityDNS(*dns))
|
opts = append(opts, cni.WithCapabilityDNS(*dns))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cgroup := config.GetLinux().GetCgroupParent(); cgroup != "" {
|
||||||
|
opts = append(opts, cni.WithCapabilityCgroupPath(cgroup))
|
||||||
|
}
|
||||||
|
|
||||||
return opts, nil
|
return opts, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user