summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-10 05:20:48 -0500
committerGitHub <noreply@github.com>2020-12-10 05:20:48 -0500
commiteaa19a1c10c8eb2e5d8a0d864c123c2f3484b01a (patch)
tree5f346f2c166b623aed76a8799ab3d3a73f52eed0 /pkg
parent9216be2008696bc9f0bc26686be8becae3d12bfc (diff)
parentb0707af68b88168fa7b48df039e27e4e165f3423 (diff)
downloadpodman-eaa19a1c10c8eb2e5d8a0d864c123c2f3484b01a.tar.gz
podman-eaa19a1c10c8eb2e5d8a0d864c123c2f3484b01a.tar.bz2
podman-eaa19a1c10c8eb2e5d8a0d864c123c2f3484b01a.zip
Merge pull request #8641 from umohnani8/play
Do not pull if image domain is localhost
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/play.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 3aeb6a2ee..5b983a3f4 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -212,8 +212,10 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
return nil, errors.Wrapf(err, "Failed to parse image %q", container.Image)
}
// In kube, if the image is tagged with latest, it should always pull
+ // but if the domain is localhost, that means the image was built locally
+ // so do not attempt a pull.
if tagged, isTagged := named.(reference.NamedTagged); isTagged {
- if tagged.Tag() == image.LatestTag {
+ if tagged.Tag() == image.LatestTag && reference.Domain(named) != image.DefaultLocalRegistry {
pullPolicy = util.PullImageAlways
}
}