in pkg/agent/datamodel/types.go [1545:1562]
func setCustomKubletConfigFromSettings(customKc *CustomKubeletConfig, kubeletConfig map[string]string) map[string]string {
// Settings from customKubeletConfig, only take if it's set.
if customKc != nil {
if customKc.ImageGcHighThreshold != nil {
kubeletConfig["--image-gc-high-threshold"] = fmt.Sprintf("%d", *customKc.ImageGcHighThreshold)
}
if customKc.ImageGcLowThreshold != nil {
kubeletConfig["--image-gc-low-threshold"] = fmt.Sprintf("%d", *customKc.ImageGcLowThreshold)
}
if customKc.ContainerLogMaxSizeMB != nil {
kubeletConfig["--container-log-max-size"] = fmt.Sprintf("%dMi", *customKc.ContainerLogMaxSizeMB)
}
if customKc.ContainerLogMaxFiles != nil {
kubeletConfig["--container-log-max-files"] = fmt.Sprintf("%d", *customKc.ContainerLogMaxFiles)
}
}
return kubeletConfig
}