mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-10 07:22:09 -03:30
Only set `discard_unpacked_layers` in the CRI image config for containerd versions earlier than 2.1.0. Starting with containerd v2.1, the CRI plugin uses the Transfer Service for image pulls by default. The `discard_unpacked_layers` option is incompatible with the Transfer Service and triggers containerd to fall back to local image pulls, logging a warning. This change prevents unsupported configuration from being applied on newer containerd versions, avoiding runtime warnings and ensuring default image pull behavior. Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>