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:
		| @@ -396,6 +396,10 @@ func cniNamespaceOpts(id string, config *runtime.PodSandboxConfig) ([]cni.Namesp | ||||
| 		opts = append(opts, cni.WithCapabilityDNS(*dns)) | ||||
| 	} | ||||
|  | ||||
| 	if cgroup := config.GetLinux().GetCgroupParent(); cgroup != "" { | ||||
| 		opts = append(opts, cni.WithCapabilityCgroupPath(cgroup)) | ||||
| 	} | ||||
|  | ||||
| 	return opts, nil | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -597,6 +597,10 @@ func cniNamespaceOpts(id string, config *runtime.PodSandboxConfig) ([]cni.Namesp | ||||
| 		opts = append(opts, cni.WithCapabilityDNS(*dns)) | ||||
| 	} | ||||
|  | ||||
| 	if cgroup := config.GetLinux().GetCgroupParent(); cgroup != "" { | ||||
| 		opts = append(opts, cni.WithCapabilityCgroupPath(cgroup)) | ||||
| 	} | ||||
|  | ||||
| 	return opts, nil | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Casey Callendrello
					Casey Callendrello