Browse Source

Always set pod-infra-container-image to protect it from image GC

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/5548/head
Brad Davidson 3 years ago committed by Brad Davidson
parent
commit
360f18d1cf
  1. 3
      pkg/daemons/agent/agent_linux.go
  2. 3
      pkg/daemons/agent/agent_windows.go

3
pkg/daemons/agent/agent_linux.go

@ -96,7 +96,8 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
if cfg.RuntimeSocket != "" {
argsMap["serialize-image-pulls"] = "false"
checkRuntimeEndpoint(cfg, argsMap)
} else if cfg.PauseImage != "" {
}
if cfg.PauseImage != "" {
argsMap["pod-infra-container-image"] = cfg.PauseImage
}
if cfg.ImageServiceSocket != "" {

3
pkg/daemons/agent/agent_windows.go

@ -88,7 +88,8 @@ func kubeletArgs(cfg *config.Agent) map[string]string {
argsMap["container-runtime"] = "remote"
argsMap["serialize-image-pulls"] = "false"
checkRuntimeEndpoint(cfg, argsMap)
} else if cfg.PauseImage != "" {
}
if cfg.PauseImage != "" {
argsMap["pod-infra-container-image"] = cfg.PauseImage
}
if cfg.ListenAddress != "" {

Loading…
Cancel
Save