Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Implement prune UX #100

Open
dhiltgen opened this issue Aug 20, 2021 · 1 comment
Open

Implement prune UX #100

dhiltgen opened this issue Aug 20, 2021 · 1 comment

Comments

@dhiltgen
Copy link
Contributor

dhiltgen commented Aug 20, 2021

Describe the problem/challenge you have

We do not currently expose a prune CLI UX to be able to clean up old images/layers in the builder which can lead to disk space pressure on the kubernetes nodes.

A simple workaround is to delete and recreate the pods, but prune should be exposed to give users better control over the age of expiry to keep useful layers around while removing others unused layers.

Description of the solution you'd like

Implement something equivalent to https://github.com/docker/buildx/blob/master/docs/reference/buildx_prune.md

Design/Architecture Details

The UX maps ~1:1 to the API so it should be fairly straight forward. Send the prune request to all builders in a multi-node setup.

When implemented, integration test coverage should also be added to exercise the implementation and ensure things are properly wired up.

Environment Details:

NA

Vote on this request

This is an invitation to the community to vote on issues. Use the "smiley face" up to the right of this comment to vote.

  • 👍 "This project will be more useful if this feature were added"
  • 👎 "This feature will not enhance the project in a meaningful way"
@hbermu
Copy link

hbermu commented May 19, 2023

Hi @dhiltgen,

I'm just on the same situation, but I don't understand which pods you delete to clean all. With nerdctl https://github.com/containerd/nerdctl I can see the absurd number of images on the buildkit namespace:

./nerdctl namespace ls
NAME           CONTAINERS    IMAGES    VOLUMES    LABELS
buildkitnew    0             609       0              
k8s.io         47            58        0              

Thanks for you report, I wish we have something to solve this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants