cri part--小小的想法~

config.go

cri的配置,四个参数:监听的服务cri的地址、cni插件(bin)的目录、cni插件配置的目录、sandbox container的镜像

type Config struct {

  Listen string  // Listen is the listening address which servers CRI.

  NetworkPluginBinDir string // NetworkPluginBinDir is the directory in which the binaries for the plugin is kept.

 NetworkPluginConfDir string  // NetworkPluginConfDir is the directory in which the admin places a CNI conf.

  SandboxImage string // SandboxImage is the image used by sandbox container.

}

service

serve用来serve来自kubelet的grpc api

type Service struct {

config *config.Config  //pouchd的config

server *grpc.Server

criMgr cri.CriMgr

}

new 一个service的时候,注册runtime service server和注册image service server

你可能感兴趣的:(cri part--小小的想法~)