Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not pull if image domain is localhost #8641

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

umohnani8
Copy link
Member

@umohnani8 umohnani8 commented Dec 7, 2020

With podman play kube, podman would always attempt to
pull if the image has the :latest tag. But this would
fail if the image was built locally and given latest
as the tag. Images build with podman and buildah have
localhost as the domain, so check if the domain is localhost.
If that is the case, then don't attempt a pull.

Fixes #7838

Signed-off-by: Urvashi Mohnani [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umohnani8

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2020
@umohnani8 umohnani8 force-pushed the play branch 2 times, most recently from b11fba3 to a44a7ba Compare December 7, 2020 21:34
@umohnani8
Copy link
Member Author

@rhatdan @mheon @baude PTAL

When using a locally built image, podman generate kube sets the container image as localhost/builtimage:tag so this check works in figuring out whether to pull the image or not.

@umohnani8 umohnani8 force-pushed the play branch 2 times, most recently from 80f5fed to 66b7e22 Compare December 7, 2020 21:35
@mheon
Copy link
Member

mheon commented Dec 7, 2020

LGTM

@TomSweeneyRedHat
Copy link
Member

a few man page nits, otherwise LGTM

With podman play kube, podman would always attempt to
pull if the image has the :latest tag. But this would
fail if the image was built locally and given latest
as the tag. Images build with podman and buildah have
localhost as the domain, so check if the domain is localhost.
If that is the case, then don't attempt a pull.

Signed-off-by: Urvashi Mohnani <[email protected]>
Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhatdan
Copy link
Member

rhatdan commented Dec 7, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2020
@vrothberg
Copy link
Member

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 8, 2020
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the pull policy to "pull if newer"?

The localhost/ prefixing of Podman and Buildah ignores the possibility of a registry running on localhost.

@vrothberg
Copy link
Member

vrothberg commented Dec 8, 2020

Could we change the pull policy to "pull if newer"?

The idea behind that proposal is that we'd be pulling an image if it exists on a registry (and has a different digest) but otherwise use the local one.

@zhangguanzhang
Copy link
Collaborator

ci task failed, need someone help to restart them, code LGTM

@rhatdan
Copy link
Member

rhatdan commented Dec 10, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 10, 2020
@openshift-merge-robot openshift-merge-robot merged commit eaa19a1 into containers:master Dec 10, 2020
@vrothberg
Copy link
Member

Why do you merge when my comments weren't addressed?

@umohnani8
Copy link
Member Author

oops, I should have commented that I am working on addressing @vrothberg's comments (spoke with him on slack). I will open a follow up PR to address those.

@umohnani8 umohnani8 deleted the play branch February 23, 2023 18:43
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

generate kube should use tag
8 participants