Skip to content

Commit f566f5a

Browse files
committed
KEP-3542 Remove percentage ranularity
1 parent 8eb36bb commit f566f5a

File tree

1 file changed

+9
-12
lines changed
  • keps/sig-node/3542-cri-image-pulling-with-progress-notification

1 file changed

+9
-12
lines changed

keps/sig-node/3542-cri-image-pulling-with-progress-notification/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ know that this has succeeded?
208208

209209
- Extend CRI to provide image pulling progress API that can be utilized by client
210210
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
211212

212213
### Non-Goals
213214

@@ -233,16 +234,14 @@ We propose introducing new (additional, not replacing old one) API for requestin
233234
that will return stream with periodic updates sent through it to the client. The image pull
234235
request parameters will contain the type of update the client wants to receive aobut the progress:
235236
- time-based
236-
- percentage-based
237237
- size-based
238238

239239
and the frequency of the updates:
240240
- 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
243242
respectively to the type
244243

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,
246245
for instance every Gibibyte downloaded.
247246

248247
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
293292
unpacking phase should be considered (see below).
294293

295294
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.
298296

299297
There is a technology that allows starting the container while it's not yet fully downloaded.
300298
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.
310308

311309
The risks are minimal, introduction of new API is not affecting any other APIs.
312310

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
314312
of progress responses published by runtime into return stream. This can be mitigated by kubelet
315313
throttling the amount of events it publishes to Pod object (publishing less than received from
316314
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.
354352

355353
The PullImageWithProgressRequest contains base information needed to do the image pull (image name, auth config
356354
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.
359357

360358
message PullImageWithProgressRequest {
361359
// Spec of the image.
@@ -367,9 +365,8 @@ every n. percent) or the size (amount of bytes/KiB/MiB downloaded). The size-bas
367365
// Granularity type of the progress reports
368366
PullImageProgressGranularity granularity_type = 4;
369367
// 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.
373370
uint32 interval = 5;
374371
}
375372

0 commit comments

Comments
 (0)