mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user