Skip to content

Commit b37e36d

Browse files
committed
move kep targets; add persist
Signed-off-by: Mike Brown <[email protected]>
1 parent 92c4cf8 commit b37e36d

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

keps/sig-node/2535-ensure-secret-pulled-images/README.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
1616
- [Risks and Mitigations](#risks-and-mitigations)
1717
- [Design Details](#design-details)
18-
- [Test Plan](#test-plan)
1918
- [Graduation Criteria](#graduation-criteria)
2019
- [Alpha](#alpha)
2120
- [Deprecation](#deprecation)
@@ -132,10 +131,10 @@ use un-encrypted...
132131

133132
## Proposal
134133

135-
For alpha `kubelet` will keep a list, since boot, of container images that required
136-
authentication and a list of the authentications that successfully pulled the image.
137-
For beta the list will be persisted across reboot of host, and restart of kubelet.
138-
Additionally, an API will be considered to manage the ensure metadata.
134+
For alpha `kubelet` will keep a list, across reboots of host and restart of
135+
kubelet, of container images that required authentication and a list of the
136+
authentications that successfully pulled the image.
137+
For beta an API will be considered to manage the ensure metadata.
139138

140139
`kubelet` will ensure any image in the list is always pulled if an authentication
141140
used is not present, thus enforcing authentication / re-authentication.
@@ -170,7 +169,7 @@ Since images can be pre-loaded, loaded outside the `kubelet` process, and
170169
garbage collected.. the list of images that required authentication in `kubelet`
171170
will not be a source of truth for how all images were pulled that are in the
172171
container runtime cache. To mitigate, images can be garbage collected at boot.
173-
And for beta, we will persist ensure metadata across reboot of host, and restart
172+
And we will persist ensure metadata across reboot of host, and restart
174173
of kubelet, and possibly look at a way to add ensure metadata for images loaded
175174
outside of kubelet. In beta we will add a switch to enable re-auth on boot for
176175
admins seeking that instead of having to garbage collect where they do not use
@@ -179,10 +178,27 @@ or expect preloaded images since boot.
179178

180179
## Design Details
181180

182-
Kubelet will track, in memory, a hash map for the credentials that were successfully used to pull an image. The hash map
183-
will not be persisted to disk, in alpha. For alpha explicitly, we will not reuse or add other state manager concepts to kubelet.
181+
Kubelet will track, in memory, a hash map for the credentials that were successfully used to pull an image. It has been decided that the hash map will be persisted to disk, in alpha.
184182

185-
See PR for detailed design / behavior documentation.
183+
See `/var/lib/kubelet/image_manager_state` in [kubernetes/kubernetes#114847](https://github.com/kubernetes/kubernetes/pull/114847)
184+
185+
> ```
186+
> {
187+
> "images": {
188+
> "sha256:eb6cbbefef909d52f4b2b29f8972bbb6d86fc9dba6528e65aad4f119ce469f7a": {
189+
> "authHash": {
190+
> "115b8808c3e7f073": {
191+
> "ensured": true,
192+
> "dueDate": "2023-05-30T05:26:53.76740982+08:00"
193+
> }
194+
> },
195+
> "name": "daocloud.io/daocloud/dce-registry-tool:3.0.8"
196+
> }
197+
> }
198+
> }
199+
> ```
200+
201+
See PR linked above for detailed design / behavior documentation.
186202
187203
### Test Plan
188204
@@ -214,6 +230,8 @@ For alpha, exhaustive Kubelet unit tests will be provided. Functions affected by
214230
```
215231
[TestShouldPullImage link](https://github.com/kubernetes/kubernetes/pull/94899/files#diff-7297f08c72da9bf6479e80c03b45e24ea92ccb11c0031549e51b51f88a91f813R311-R438)
216232
233+
PersistHashMeta()
234+
217235
At beta we should revisit if integration buckets are warranted for e2e node and/or cri-tools/critest, and after gathering feedback.
218236
219237
### Graduation Criteria

keps/sig-node/2535-ensure-secret-pulled-images/kep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ approvers:
1818
prr-approvers:
1919
- "@johnbelarmic"
2020
stage: alpha
21-
latest-milestone: "v1.24"
21+
latest-milestone: "v1.28"
2222
milestone:
23-
alpha: "v1.24"
24-
beta: "v1.25"
25-
stable: "v1.27"
23+
alpha: "v1.28"
24+
beta: "v1.29"
25+
stable: "v1.31"
2626
feature-gates:
2727
- name: KubeletEnsureSecretPulledImages
2828
components:

0 commit comments

Comments
 (0)