summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-01-27 11:53:39 -0600
committerBrent Baude <bbaude@redhat.com>2020-01-28 13:36:10 -0600
commit31a1f44fe6934c6247f7bf2f5774805b263da660 (patch)
treea818496c7612b310d0b651fcc954d23df802a6c4 /libpod
parentd07c26310697d8874219731c6c42f6d0d0330e87 (diff)
downloadpodman-31a1f44fe6934c6247f7bf2f5774805b263da660.tar.gz
podman-31a1f44fe6934c6247f7bf2f5774805b263da660.tar.bz2
podman-31a1f44fe6934c6247f7bf2f5774805b263da660.zip
honor pull policy in play kube
When a container specification has a pull policy, we should honor it when recreating the pods/containers from yaml. furthermore, ini kube, if a tag is :latest, then the always pull policy is automatically instituted. Fixes: #4880 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/config.go6
-rw-r--r--libpod/image/parts.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/libpod/image/config.go b/libpod/image/config.go
index bb84175a3..efd83d343 100644
--- a/libpod/image/config.go
+++ b/libpod/image/config.go
@@ -1,5 +1,11 @@
package image
+const (
+ // LatestTag describes the tag used to refer to the latest version
+ // of an image
+ LatestTag = "latest"
+)
+
// ImageDeleteResponse is the response for removing an image from storage and containers
// what was untagged vs actually removed
type ImageDeleteResponse struct { //nolint
diff --git a/libpod/image/parts.go b/libpod/image/parts.go
index d4677f935..d6c98783b 100644
--- a/libpod/image/parts.go
+++ b/libpod/image/parts.go
@@ -67,7 +67,7 @@ func (ip *imageParts) suspiciousRefNameTagValuesForSearch() (string, string, str
} else if _, hasDigest := ip.unnormalizedRef.(reference.Digested); hasDigest {
tag = "none"
} else {
- tag = "latest"
+ tag = LatestTag
}
return registry, imageName, tag
}