Created
October 21, 2016 12:19
-
-
Save resouer/6ad3ec445cdab0ab3a8e5149a734d294 to your computer and use it in GitHub Desktop.
infra container in cri-o
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cri-o中infra container的处理,都在server/sandbox.go里。 | |
infra container即pod/sandbox,名字是:sandbox.name + "-infra" | |
infra container的管理逻辑是由kubelet控制的,调用crio的sandbox方法,比如下面的: | |
RunPodSandbox | |
负责hold network namespace of pod,所以需要处理: | |
1. set DNS option | |
2. mount /etc/resolv.conf | |
3. netPlugin.SetUpPod 配置容器网络 | |
4. 剩下的启动过程和普通container相同 | |
StopPodSandbox | |
停止之前要先netPlugin.TearDownPod | |
简单的说(未逐行验证,但design是这样): | |
1. 所有对container的操作,都是对user container的操作 | |
2. 对infra container的操作,都叫sandbox xxx | |
3. 具体执行哪个操作,应该kubelet的逻辑来管理,cri-o只需要准备好调用的接口 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment