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

leverage containerd image pinning #3441

Open
BenTheElder opened this issue Nov 30, 2023 · 7 comments
Open

leverage containerd image pinning #3441

BenTheElder opened this issue Nov 30, 2023 · 7 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@BenTheElder
Copy link
Member

BenTheElder commented Nov 30, 2023

So we can potentially re-enable image GC. #735

@ruiwen-zhao added this to containerd 1.6+ (not sure specific version yet) and we should leverage it for the pre-loaded images in kind.

@BenTheElder BenTheElder added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 30, 2023
@roman-kiselenko
Copy link
Contributor

roman-kiselenko commented Dec 1, 2023

Hey! I want to work on this.
/cc @BenTheElder @aojea

@BenTheElder
Copy link
Member Author

hey!

So I started looking into this and we'll need to label the images with --label io.cri-containerd.pinned=pinned --label io.cri-containerd.image=managed.

I know this is available for ctr images pull, we need to verify if it is for import and if not we'll need to PR that upstream first.

Also, we need to be on a sufficiently new conatinerd release first. I didn't track down exactly which version yet, that would be helpful.

We then need to decide which images this applies to.
I think to start we should do all images in kindest/node but NOT later added kind load ... images.

Turning on GC afterwards remains an open question, there's some bad trade-offs there:

  1. What about user side-loaded images? Maybe we should? This could be surprising behavior.
  2. image GC knobs are based on % of disk, but the host disk is not being used exclusively for this cluster and on a desktop maybe 90% full disk doesn't mean we should GC images ..... turning this on is definitely a breaking change and it's not clear what the threshold is.

Still, we can at least go ahead and clearly label kind's core bundled images as "don't GC this".

@roman-kiselenko
Copy link
Contributor

roman-kiselenko commented Dec 4, 2023

we need to verify if it is for import and if not we'll need to PR that upstream first.

Yep, the labeling is only available for pull and there is no --label option for import. 😞

Status of image pinning feature:

I've implemented a simple pin logic for the node-image building process here #3444

@BenTheElder
Copy link
Member Author

Yep, the labeling is only available for pull and there is no --label option for import. 😞

We should work with containerd to add this feature.

@roman-kiselenko
Copy link
Contributor

Yep, the labeling is only available for pull and there is no --label option for import. 😞

We should work with containerd to add this feature.

I'll give it a try and propose changes to the containerd. 🙏

@roman-kiselenko
Copy link
Contributor

roman-kiselenko commented Dec 8, 2023

I've opened a PR with related changes in the containerd repo and updated the related PR in the kind repo.

@roman-kiselenko
Copy link
Contributor

PR with --label flag merged.

Flag will be available in the next major release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants