@@ -208,6 +208,7 @@ know that this has succeeded?
208
208
209
209
- Extend CRI to provide image pulling progress API that can be utilized by client
210
210
tools (crictl pull), or machinery (kubelet pulling the image)
211
+ - Implement PoC / draft for CRI PullImageWithProgress call to runtime in Kubelet for API review purposes
211
212
212
213
### Non-Goals
213
214
@@ -233,16 +234,14 @@ We propose introducing new (additional, not replacing old one) API for requestin
233
234
that will return stream with periodic updates sent through it to the client. The image pull
234
235
request parameters will contain the type of update the client wants to receive aobut the progress:
235
236
- time-based
236
- - percentage-based
237
237
- size-based
238
238
239
239
and the frequency of the updates:
240
240
- every N seconds
241
- - every N percents of total image size being downloaded
242
- - every N bytes of the total image size being downloaded
241
+ - every N Kibibytes of the total image size being downloaded
243
242
respectively to the type
244
243
245
- If the client did not specify the preferred notification granularity, default values can be used,
244
+ If the client did not specify the preferred notification granularity, default values should be used,
246
245
for instance every Gibibyte downloaded.
247
246
248
247
This will be easy to use in CRI-compliant command-line-tools as well as kubelet to monitor the
@@ -293,8 +292,7 @@ There should be a guidance on how the runtime should report the progress, for in
293
292
unpacking phase should be considered (see below).
294
293
295
294
Pulling an image consists of two actions - downloading particular layer of the image
296
- and unpacking it. This repeats for every layer in the image, and this unpacking should be taken
297
- in account when runtime is reporting percentage.
295
+ and unpacking it. This repeats for every layer in the image.
298
296
299
297
There is a technology that allows starting the container while it's not yet fully downloaded.
300
298
This should not conflict with the notifications about the image downloading progress, in such case
@@ -310,7 +308,7 @@ use regular silent ImagePull API call.
310
308
311
309
The risks are minimal, introduction of new API is not affecting any other APIs.
312
310
313
- Misconfiguration of image pull request progress granularity for kubelet can result in bit number
311
+ Misconfiguration of image pull request granularity for kubelet can result in big number
314
312
of progress responses published by runtime into return stream. This can be mitigated by kubelet
315
313
throttling the amount of events it publishes to Pod object (publishing less than received from
316
314
runtime), as well as in runtime by metering amount of responses being sent within time interval.
@@ -354,8 +352,8 @@ runtime CRI image service server.
354
352
355
353
The PullImageWithProgressRequest contains base information needed to do the image pull (image name, auth config
356
354
and sandbox information), and it will also contain information how often the server should send progress reports.
357
- The CRI client can restrict the progress reporting to be time based (once every n. seconds), percent based (after
358
- every n. percent) or the size (amount of bytes/KiB/MiB downloaded). The size-based should be the default one.
355
+ The CRI client can restrict the progress reporting to be time- based (e.g. once every n. seconds),
356
+ or based on size (amount of bytes/KiB/MiB downloaded). The size-based should be the default one.
359
357
360
358
message PullImageWithProgressRequest {
361
359
// Spec of the image.
@@ -367,9 +365,8 @@ every n. percent) or the size (amount of bytes/KiB/MiB downloaded). The size-bas
367
365
// Granularity type of the progress reports
368
366
PullImageProgressGranularity granularity_type = 4;
369
367
// The interval value of the chosen granularity.
370
- // For time based granularity, this is the number of seconds between reports. If time interval is 0, then report is done every 60s.
371
- // For percent based granularity, this is the number of percent value between reports. If percent interval is 0, then report is done every 10%
372
- // For the default size based granularity, this is the number of kibibytes received between reports. If set to 0, then runtime will report progress as image is downloaded and unpacked.
368
+ // For time-based granularity, this is the number of seconds between reports. If time interval is 0, the progress shouhld be sent every 60s.
369
+ // For size-based granularity, this is the number of kibibytes received between reports. If set to 0, then runtime will decide when to report progress as image is downloaded and unpacked.
373
370
uint32 interval = 5;
374
371
}
375
372
0 commit comments