Skip to content

Commit 56a4ee0

Browse files
authored
Merge pull request kubernetes#2694 from haircommander/image-no-gc
Update CRI KEP with pinned Image requirement
2 parents 5bd5fa1 + f74a2c3 commit 56a4ee0

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

keps/sig-node/2040-kubelet-cri/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Kubelet CRI support
32

43
<!-- toc -->
@@ -13,6 +12,7 @@
1312
- [Identified Work Items](#identified-work-items)
1413
- [Changes from v1alpha2 to v1beta1](#changes-from-v1alpha2-to-v1beta1)
1514
- [Clean Up](#clean-up)
15+
- [Pinned Images](#pinned-images)
1616
- [Test Plan](#test-plan)
1717
- [Graduation Criteria](#graduation-criteria)
1818
- [Alpha -&gt; Beta Graduation](#alpha---beta-graduation)
@@ -81,6 +81,7 @@ Evolve the CRI API version as we address feedback in each milestone towards stab
8181
- No longer map the `container-runtime-endpoint` flag as experimental.
8282
- Keep the `image-service-endpoint` flag as experimental and evaluate if it makes sense to keep
8383
as a configurable or remove it.
84+
- Introduce field in the `Image` message to indicate an image should not be garbage collected (see #pinned-images)
8485

8586
#### Changes from v1alpha2 to v1beta1
8687

@@ -100,6 +101,26 @@ Need Sig-Node and Sig-Networking to help validate if / when kubenet is being dep
100101
- Removal of TODOs that are no longer valid should be done before v1beta. We have scraped the api specification once and have a small
101102
list of commits to file.
102103

104+
#### Pinned Images
105+
- Introduce field in the `Image` message to indicate an image should not be garbage collected:
106+
```golang
107+
message Image {
108+
...
109+
ImageSpec spec = 7;
110+
// Recommendation on whether this image should be exempt from garbage collection.
111+
// It must only be treated as a recommendation--the client can still request the image be deleted,
112+
// and the runtime must oblige.
113+
bool pinned = 8;
114+
115+
}
116+
...
117+
```
118+
- Rely on this behavior instead of having the Kubelet keep track of expected pause image.
119+
- In other words, have the runtime say the required pause image is pinned, indicating the Kubelet should not garbage collect it.
120+
- As a result, support for `pod-infra-container` option in Kubelet will be dropped (not part of this KEP, but worth mentioning).
121+
- See https://github.com/kubernetes/kubernetes/pull/101808 for more details.
122+
123+
103124
### Test Plan
104125
- Review of the existing test cases in critest and adding more if we find any gaps.
105126
- Make sure we have e2e node (and possibly selected e2e conformance) tests running on more than one CRI implementation.
@@ -113,6 +134,7 @@ list of commits to file.
113134
- Documentation is updated to reflect beta status.
114135
- Update the CI with containerd and CRI-O versions that support the v1 proto.
115136
- Ensure that the required CRI stats changes are included. See https://github.com/kubernetes/enhancements/issues/2371.
137+
- Introduce field in the `Image` message to indicate an image should not be garbage collected (see #pinned-images)
116138

117139
#### Beta -> GA Graduation
118140
- TBD

keps/sig-node/2040-kubelet-cri/kep.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stage: beta
2121
# The most recent milestone for which work toward delivery of this KEP has been
2222
# done. This can be the current (upcoming) milestone, if it is being actively
2323
# worked on.
24-
latest-milestone: "v1.21"
24+
latest-milestone: "v1.22"
2525

2626
# The milestone at which this feature was, or is targeted to be, at each stage.
2727
milestone:
@@ -30,4 +30,4 @@ milestone:
3030

3131
# The following PRR answers are required at beta release
3232
metrics:
33-
- TBD
33+
- "N/A"

0 commit comments

Comments
 (0)