Skip to content

Instantly share code, notes, and snippets.

@sameo
Last active November 10, 2016 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sameo/26448be7f484c736fa5f5bcf7af2d17c to your computer and use it in GitHub Desktop.
Save sameo/26448be7f484c736fa5f5bcf7af2d17c to your computer and use it in GitHub Desktop.
CRI-O networking code flow
github.com/kubernetes-incubator/cri-o/server/sandbox.go
  RunPodSandbox()
    oci.NewContainer()
    s.runtime.CreateContainer()
    s.netPlugin.SetUpPod(netnsPath, podNamespace, id, containerName)
    s.runtime.StartContainer()
    
    
github.com/rajatchopra/ocicni/ocicni.go
  s.netPlugin.SetUpPod()
  plugin.loNetwork.addToNetwork()
  plugin.getDefaultNetwork().addToNetwork()
    rt = buildCNIRuntimeConf()
    cninet.AddNetwork(netconf, rt)
    
github.com/containernetworking/cni/libcni/api.go
  AddNetwork()
    ExecPluginWithResult()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment