If the image with :latest tag specified in Spec, kubelet should try

to pull the latest one even the policy is PullIfNotPresent.
This commit is contained in:
Dawn Chen
2014-11-14 14:20:29 -08:00
parent 4681918888
commit f729d748ac
2 changed files with 13 additions and 1 deletions

View File

@@ -247,6 +247,16 @@ func (p dockerPuller) IsImagePresent(name string) (bool, error) {
return false, err
}
// RequireLatestImage returns if the user wants the latest image
func RequireLatestImage(name string) bool {
_, tag := parseImageName(name)
if tag == "latest" {
return true
}
return false
}
func (p throttledDockerPuller) IsImagePresent(name string) (bool, error) {
return p.puller.IsImagePresent(name)
}