cri: Use the runtimeHandler parameter in PullImage#12710
cri: Use the runtimeHandler parameter in PullImage#12710mikebrow merged 1 commit intocontainerd:mainfrom
Conversation
|
Just curious, should annotations.RuntimeHandler be deprecated/removed now? |
I think it could, I'd be more than happy to do so in a different PR after I'm back from vacation. :-) |
mikebrow
left a comment
There was a problem hiding this comment.
Thanks for taking this TODO on.. see comments
The runtimeHandler parameter was added to PullImage() but never used. Instead, the code relied on an experimental annotation (io.containerd.cri.runtime-handler) passed in the pod sandbox config. This annotation was a workaround because CRI's PullImageRequest didn't include the runtime handler. However, since cri-api v0.29.0, the runtime handler is available in the API and passed as a parameter to PullImage(). For backward compatibility with CRI clients that don't yet pass the runtime handler parameter, we fall back to the annotation if the parameter is empty. The annotation-based fallback is deprecated and will be removed in containerd 2.5. Signed-off-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Fabiano Fidêncio <[email protected]>
10dd87d to
b8ae041
Compare
|
@mikebrow, just adjusted the PR and made a note about deprecating the annotation in 2.5 (so it gives enough time for other clients to adjust). Please, give it a second pass. Also, as this does not break any backwards compat, it'd be nice to have it backported to 2.2 (which seems to be the new LTS?). |
|
/cherrypick release/2.2 |
|
@mikebrow: new pull request created: #12721 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The runtimeHandler parameter was added to PullImage() but never used.
Instead, the code relied on an experimental annotation
(io.containerd.cri.runtime-handler) passed in the pod sandbox config.
This annotation was a workaround because CRI's PullImageRequest didn't
include the runtime handler. However, since cri-api v0.29.0, the runtime
handler is available in the API and passed as a parameter to PullImage().
For backward compatibility with CRI clients that don't yet pass the
runtime handler parameter, we fall back to the annotation if the
parameter is empty. The annotation-based fallback is deprecated and
will be removed in containerd 2.5.
cc @kiashok @mxpv @mikebrow @fuweid @zvonkok @danmihai1 @skaegi