mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
only pull addon images when it does not exist
This commit is contained in:
parent
22e3e79c53
commit
884fbf3d22
@ -875,7 +875,10 @@ function kube::release::write_addon_docker_images_for_server() {
|
||||
kube::log::status "Pulling and writing Docker image for addon: ${addon_path}"
|
||||
|
||||
local dest_name="${addon_path//\//\~}"
|
||||
if [[ -z $("${DOCKER[@]}" images | awk '{print ($1":"$2)}' | grep "${addon_path}") ]]; then
|
||||
kube::log::status "Addon image ${addon_path} does not exist, pulling it..."
|
||||
"${DOCKER[@]}" pull "${addon_path}"
|
||||
fi
|
||||
"${DOCKER[@]}" save "${addon_path}" > "${1}/${dest_name}.tar"
|
||||
) &
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user