config.go
cri的配置麻裁,四個(gè)參數(shù):監(jiān)聽(tīng)的服務(wù)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用來(lái)serve來(lái)自kubelet的grpc api
type Service struct {
config *config.Config? //pouchd的config
server *grpc.Server
criMgr cri.CriMgr
}
new 一個(gè)service的時(shí)候色迂,注冊(cè)runtime service server和注冊(cè)image service server