-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support image pull cache for App CR to archieve 'imagePullPolicy: IfNotPresent' #1411
Comments
This issue is being marked as stale due to a long period of inactivity and will be closed in 5 days if there is no response. |
@jessehu Are you trying to pull a bundle or an image? We already have caching available for images and bundles, although, I think it doesn't work if the bundle is not colocated. |
I'm pulling an image. It's not cached because kapp-controller reports not able to pull the image when the image registry server goes down. |
If the image size is huge, we would prefer not to cache it in kapp-controller as it will increase the size of the kc container. |
We can configure the max size by setting an env in the pod (ref). However, a higher cache max size is not recommended because of the reasons that Renu mentioned. To make this easier we could start making this config more accessible via Kapp-controllers config, but we should definitely be conscious of the impact this has on the footprint. |
Thank you. The images I need to pull is very small (n KB). |
What version of kapp-controller are you using? |
hi @joaopapereira I'm using kapp-controller 0.44.6. Here is the Package CR yaml which uses image tag name not SHA.
|
Since you are using a tag vendir cannot guarantee that the image will be the same, so it will not cache it. |
Got it. Is it reasonable to let vendir cache a image with tag as well (in addition to sha256) ? A tag is immutable. |
Found this PR but it also requires image SHA not tag: Activate caching of images and bundles by joaopapereira · Pull Request #909 · carvel-dev/kapp-controller |
The problem is that your particular tag might be immutable, but we cannot guarantee that all tags used in |
Yup, latest tag is not immutable but others should be especially in product env (e.g. docker hub). Or could we have an vendir or kapp-controller option to cache images with tag ? |
Thank you all for the guidance. I managed to make the image fetch cache work by switching to image sha256 and optionally adding the following env var VENDIR_MAX_CACHE_SIZE for kapp-controller-sidecarexec pod:
|
Describe the problem/challenge you have
Hello, is there an option similar to IfNotPresent in K8s for the image url used in fetch ?
https://carvel.dev/kapp-controller/docs/v0.48.x/packaging/
The reason for this feature is:
This is discussed in https://kubernetes.slack.com/archives/CH8KCCKA5/p1700836690956389
Describe the solution you'd like
vendir v0.36.0 supports Only run sync for stable versions, if vendir.yaml has changed since last sync · Issue #278 · carvel-dev/vendir. kapp-controller can utilize it.
Anything else you would like to add:
[Additional information that will assist in solving the issue.]
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: