enhancements icon indicating copy to clipboard operation
enhancements copied to clipboard

kubelet image GC after a maximum age

Open haircommander opened this issue 9 months ago • 28 comments

Enhancement Description

  • One-line enhancement description (can be used as a release note): Add Kubelet option to specify the maximum age an image will be kept around before it is garbage collected

  • Kubernetes Enhancement Proposal:

  • Discussion Link: Discussed in SIG-Node as well as SIG-Node Image GC WG

  • Primary contact (assignee): @haircommander

  • Responsible SIGs: Node

  • Enhancement target (which target equals to which milestone):

    • Alpha release target (x.y): 1.29
    • Beta release target (x.y):
    • Stable release target (x.y):
  • [x] Alpha

    • [x] KEP (k/enhancements) update PR(s): https://github.com/kubernetes/enhancements/pull/4211
    • [x] Code (k/k) update PR(s): https://github.com/kubernetes/kubernetes/pull/121275
    • [x] Docs (k/website) update PR(s): https://github.com/kubernetes/website/pull/43544
  • [ ] Beta

    • [x] KEP (k/enhancements) update PR(s):
      • https://github.com/kubernetes/enhancements/pull/4426
    • [ ] Code (k/k) update PR(s):
      • https://github.com/kubernetes/kubernetes/pull/123343
      • https://github.com/kubernetes/kubernetes/pull/123345
      • https://github.com/kubernetes/kubernetes/pull/123424
    • [ ] Docs (k/website) update(s):

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

haircommander avatar Sep 14 '23 19:09 haircommander

/sig node

haircommander avatar Sep 14 '23 19:09 haircommander

/stage alpha /milestone v1.29 /label lead-opted-in

SergeyKanzhelev avatar Sep 15 '23 22:09 SergeyKanzhelev

cc/ @bsdnet to help reviewing.

dchen1107 avatar Sep 18 '23 21:09 dchen1107

Hello @haircommander 👋, 1.29 Enhancements team here!

Just checking in as we approach enhancements freeze on 01:00 UTC, Friday, 6th October, 2023.

This enhancement is targeting for stage alpha for 1.29 (correct me, if otherwise)

Here's where this enhancement currently stands:

  • [ ] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [ ] KEP status is marked as implementable for latest-milestone: 1.29. KEPs targeting stable will need to be marked as implemented after code PRs are merged and the feature gates are removed.
  • [ ] KEP readme has up-to-date graduation criteria
  • [ ] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here).

It looks like https://github.com/kubernetes/enhancements/pull/4211/files will address most of these issues when it merges in!

The status of this enhancement is marked as at risk for enhancement freeze. Please keep the issue description up-to-date with appropriate stages as well. Thank you!

npolshakova avatar Sep 22 '23 17:09 npolshakova

/assign @haircommander

kannon92 avatar Sep 27 '23 13:09 kannon92

Hi @haircommander, just checking in once more as we approach the 1.29 enhancement freeze deadline this week on 01:00 UTC, Friday, 6th October, 2023. The status of this enhancement is marked as at risk for enhancement freeze.

It looks like https://github.com/kubernetes/enhancements/pull/4211 will address most of the requirements when it merges. Let me know if I missed anything. Thanks!

npolshakova avatar Oct 03 '23 14:10 npolshakova

With KEP PR https://github.com/kubernetes/enhancements/pull/4211 approved, the enhancement is ready for the enhancements freeze. The status is now marked as tracked for enhancement freeze for 1.29. 🚀 Thank you!

npolshakova avatar Oct 06 '23 00:10 npolshakova

Hey there @haircommander! :wave:, v1.29 Docs Lead here. Does this enhancement work planned for v1.29 require any new docs or modification to existing docs? If so, please follows the steps here to open a PR against dev-1.29 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thursday, 19 October 2023. Also, take a look at Documenting for a release to get yourself familiarize with the docs requirement for the release. Thank you!

katcosgrove avatar Oct 09 '23 08:10 katcosgrove

https://github.com/containerd/containerd/pull/9022 adds support for image expiration in GC, which is a similar concept. But this is a containerd v2.0 feature.

pacoxu avatar Oct 17 '23 05:10 pacoxu

Hi again @haircommander! The deadline to open a placeholder PR against k/website for required documentation is this Thursday, 19 October. Could you please update me on the status of docs for this enhancement? Thank you!

katcosgrove avatar Oct 17 '23 10:10 katcosgrove

thanks for the reminder @katcosgrove I've opened the draft here https://github.com/kubernetes/website/pull/43544

haircommander avatar Oct 17 '23 20:10 haircommander

Hey again @haircommander 👋 1.29 Enhancements team here,

Just checking in as we approach code freeze at 01:00 UTC Wednesday 1st November 2023: .

Here's where this enhancement currently stands:

  • [ ] All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • [ ] All PR/s are ready to be merged (they have approved and lgtm labels applied) by the code freeze deadline. This includes tests.

This KEP is currently marked as at risk for code freeze.

Also, please let me know if there are other PRs in k/k we should be tracking for this KEP. As always, we are here to help if any questions come up. Thanks!

npolshakova avatar Oct 23 '23 18:10 npolshakova

@haircommander can you update this issue with the relevant PRs for alpha?

https://github.com/kubernetes/kubernetes/pull/121275 should be added to this description.

https://github.com/kubernetes/enhancements/pull/4211 is another that should be added.

kannon92 avatar Oct 25 '23 18:10 kannon92

Hi @haircommander, 👋 from the v1.29 Release Team-Communications! We would like to check if you have any plans to publish a blog for this KEP regarding new features, removals, and deprecations for this release.

If so, you need to open a PR placeholder in the website repository. The deadline will be on Tuesday 14th November 2023 (after the Docs deadline PR ready for review)

Here is the 1.29 calendar

a-mccarthy avatar Oct 30 '23 18:10 a-mccarthy

Thanks for updating the issue description. This is now tracked for code freeze for 1.29! 🚀

npolshakova avatar Oct 30 '23 19:10 npolshakova

SIG Node, don't forget to document the changes here. SIG Docs (and SIG Release's release docs subteam) can help you understand what to do.

sftim avatar Nov 14 '23 09:11 sftim

I updated the PR!

haircommander avatar Nov 14 '23 18:11 haircommander

/remove-label lead-opted-in

salehsedghpour avatar Jan 06 '24 15:01 salehsedghpour

Hello 👋 1.30 Enhancements Lead here,

I'm closing milestone 1.29 now, If you wish to progress this enhancement in v1.30, please follow the instructions here to opt in the enhancement and make sure the lead-opted-in label is set so it can get added to the tracking board and finally add /milestone v1.30. Thanks!

/milestone clear

salehsedghpour avatar Jan 16 '24 23:01 salehsedghpour

/stage beta /milestone v1.30

(as per https://github.com/kubernetes/enhancements/pull/4426)

SergeyKanzhelev avatar Jan 23 '24 00:01 SergeyKanzhelev

/label lead-opted-in

mrunalp avatar Feb 02 '24 04:02 mrunalp

Hello @haircommander 👋, Enhancements team here.

Just checking in as we approach enhancements freeze on 02:00 UTC Friday 9th February 2024.

This enhancement is targeting for stage beta for v1.30 (correct me, if otherwise)

Here's where this enhancement currently stands:

  • [ ] KEP readme using the latest template has been merged into the k/enhancements repo.
  • [x] KEP status is marked as implementable for latest-milestone: 1.30.
  • [x] KEP readme has up-to-date graduation criteria
  • [ ] KEP has a production readiness review that has been completed and merged into k/enhancements. (For more information on the PRR process, check here).

For this KEP, we would just need to update the following:

  • The production readiness review should be completed. One question appears partially unanswered.
  • Make sure the PR with the information get merged before enhancement freeze, I just found this PR.

The status of this enhancement is marked as at risk for enhancement freeze. Please keep the issue description up-to-date with appropriate stages as well. Thank you!

pnbrown avatar Feb 07 '24 16:02 pnbrown

With all the requirements fulfilled this enhancement is now marked as tracked for the upcoming enhancements freeze 🚀

pnbrown avatar Feb 09 '24 02:02 pnbrown

Hi @pnbrown!

Can you:

  • Update your issue description to include a checklist for the beta release in 1.30?

Also, please open a docs placeholder PR by the end of the week <3. Even if you aren't making any functionality changes in this release, remember to update your feature flags from alpha to beta! ✨

celestehorgan avatar Feb 14 '24 11:02 celestehorgan

Hi @celestehorgan, I'm just on the Enhancements team. @haircommander is the owner.

pnbrown avatar Feb 14 '24 12:02 pnbrown

Hi @haircommander ,

👋 from the v1.30 Communications Team! We'd love for you to opt in to write a feature blog about your enhancement!

We encourage blogs for features including, but not limited to: breaking changes, features and changes important to our users, and features that have been in progress for a long time and are graduating.

To opt in, you need to open a Feature Blog placeholder PR against the website repository. The placeholder PR deadline is 27th February, 2024. Here's the 1.30 Release Calendar

Checksumz avatar Feb 15 '24 09:02 Checksumz

Hey again @haircommander 👋 Enhancements team here,

Just checking in as we approach code freeze at 02:00 UTC Wednesday 6th March 2024 .

Here's where this enhancement currently stands:

  • [x] All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • [x] All PR/s are ready to be merged (they have approved and lgtm labels applied) by the code freeze deadline. This includes tests.

Also, please let me know if there are other PRs in k/k we should be tracking for this KEP. As always, we are here to help if any questions come up. Thanks!

pnbrown avatar Feb 29 '24 00:02 pnbrown

I was initially confused by the MinAge and ImageGCMaxAge config flags. I had to read the docs and api comments to understand better. Here's a clearer breakdown to help others:

  1. MinAge: This truly is the minimum age (time since it was first pulled) before the kubelet considers garbage collecting an image.

  2. ImageGCMaxAge: This is better understood as the maximum time an image can remain unused before the image become eligible for garbage collection.

It might be better to rename the flag to ImageUnusedThreshold or MaxUnusedTime or similar to be more accurate.

AnishShah avatar Mar 13 '24 22:03 AnishShah