|
|
@ -15,7 +15,7 @@ function create_container_image_tar() { |
|
|
|
IMAGES=$(kubectl describe pods --all-namespaces | grep " Image:" | awk '{print $2}' | sort | uniq) |
|
|
|
# NOTE: etcd and pause cannot be seen as pods. |
|
|
|
# The pause image is used for --pod-infra-container-image option of kubelet. |
|
|
|
EXT_IMAGES=$(kubectl cluster-info dump | egrep "quay.io/coreos/etcd:|k8s.gcr.io/pause:" | sed s@\"@@g) |
|
|
|
EXT_IMAGES=$(kubectl cluster-info dump | egrep "quay.io/coreos/etcd:|registry.k8s.io/pause:" | sed s@\"@@g) |
|
|
|
IMAGES="${IMAGES} ${EXT_IMAGES}" |
|
|
|
|
|
|
|
rm -f ${IMAGE_TAR_FILE} |
|
|
@ -46,12 +46,12 @@ function create_container_image_tar() { |
|
|
|
|
|
|
|
# NOTE: Here removes the following repo parts from each image |
|
|
|
# so that these parts will be replaced with Kubespray. |
|
|
|
# - kube_image_repo: "k8s.gcr.io" |
|
|
|
# - kube_image_repo: "registry.k8s.io" |
|
|
|
# - gcr_image_repo: "gcr.io" |
|
|
|
# - docker_image_repo: "docker.io" |
|
|
|
# - quay_image_repo: "quay.io" |
|
|
|
FIRST_PART=$(echo ${image} | awk -F"/" '{print $1}') |
|
|
|
if [ "${FIRST_PART}" = "k8s.gcr.io" ] || |
|
|
|
if [ "${FIRST_PART}" = "registry.k8s.io" ] || |
|
|
|
[ "${FIRST_PART}" = "gcr.io" ] || |
|
|
|
[ "${FIRST_PART}" = "docker.io" ] || |
|
|
|
[ "${FIRST_PART}" = "quay.io" ] || |
|
|
|