本文qq空间链接:http://user.qzone.qq.com/29185807/blog/1460429307
本文csdn博客链接:http://blog.csdn.net/screscent/article/details/51131261
源码为k8s v1.1.1稳定版本
2.3、imageManager
1、参数
代码在k8s.io\kubernetes\cmd\kubelet\app中
结构体变量
type KubeletServer struct {
...
ImageGCHighThresholdPercent int
ImageGCLowThresholdPercent int
CAdvisorPort uint
...
}
默认参数
func NewKubeletServer() *KubeletServer {
return &KubeletServer{
...
ImageGCHighThresholdPercent: 90,
ImageGCLowThresholdPercent: 80,
CAdvisorPort: 4194,
...
}
}
flag参数
func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
...
fs.UintVar(&s.CAdvisorPort, "cadvisor-port", s.CAdvisorPort, "The port of the localhost cAdvisor endpoint")
fs.IntVar(&s.ImageGCHighThresholdPercent, "image-gc-high-threshold", s.ImageGCHighThresholdPercent, "The percent of disk usage after which image garbage collection is always run. Default: 90%%")
fs.IntVar(&s.ImageGCLowThresholdPercent, "image-gc-low-threshold"