Skip to content

Commit

Permalink
Add supported import images to containerd in pre-run-e2e.
Browse files Browse the repository at this point in the history
  • Loading branch information
chengxiangdong committed Jan 12, 2023
1 parent cf87845 commit 66cf683
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/pre-run-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ echo -e "\nBuild images"
# todo: Maybe we need load the image to target cluster node.
make image-huawei-cloud-controller-manager

tmpPath=$(mktemp -d)
is_containerd=`command -v containerd`
echo "is_containerd: ${is_containerd}"
if [[ -x ${is_containerd} ]]; then
docker save -o "${tmpPath}/huawei-cloud-controller-manager.tar" ${REGISTRY_SERVER_ADDRESS}/k8s-cloudprovider/huawei-cloud-controller-manager:${VERSION}
ctr -n=k8s.io i import ${tmpPath}/huawei-cloud-controller-manager.tar
rm -rf ${tmpPath}/huawei-cloud-controller-manager.tar
fi

echo -e "\nCheck cloud-config secret"
count=`kubectl get -n kube-system secret cloud-config | grep cloud-config | wc -l`
if [[ "$count" -ne 1 ]]; then
Expand Down

0 comments on commit 66cf683

Please sign in to comment.