We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
完善镜像数据迁移脚本,脚本做了以下的事情:
可以使用 minio 作为 S3 存储来测试, 位置可以放在本仓库的 scripts/migrate.shell, 有疑问请随时在本 issue 回帖:)
scripts/migrate.shell
更多内容: 完善变量传参,包括 处理数据的临时目录,镜像名,远程仓库名,S3 存储相关的 地址/accessKey/accessSecret 等内容
/help
下面是目前这个脚本,基于这个脚本来完成:
#!/bin/bash export DIRECTORY="/home/lan/tmp" rm -f $DIRECTORY/* export REGISTRY_IMAGES=( coredns/coredns ) export BUCKET=registry export IMAGE_REGISTRY=${IMAGE_REGISTRY:-"registry.k8s.io"} cd $DIRECTORY echo $REGISTRY_IMAGES TAGS=$(jq -r '.tags[]' tags.json) echo "TAGS:"$TAGS for tag in $TAGS;do echo "TAG:"$tag for IMAGE in "${REGISTRY_IMAGES[@]}" do IMAGE_EXIST=`oras manifest fetch ghcr.io/liangyuanpeng/lank8simgs:$BUCKET-$IMAGE-$tag | grep mediaType | wc -l ` if [ $IMAGE_EXIST -eq 1 ]; then echo "this ID have info:$IMAGE_REGISTRY/$IMAGE:$tag" continue fi echo "working for:$IMAGE_REGISTRY/$IMAGE:$tag" export FILENAME=$IMAGE FILENAME=tmp crane pull --verbose $IMAGE_REGISTRY/$IMAGE:$tag $FILENAME.tgz tar -xf $FILENAME.tgz rm -f $FILENAME.tgz rm -f manifest.json rm -f sha256* pwd find ./ -name "*.tar.gz" | awk -F "." '{print $2}' | xargs -i -t mv ./{}.tar.gz ./{} ls files=$(ls $DIRECTORY/) for filename in $files do echo $filename #TODO 使用 minio的命令 mc done oras push ghcr.io/liangyuanpeng/lank8simgs:$BUCKET-$IMAGE-$tag pwd ls rm -f $DIRECTORY/* done done
tags.json
{ "tags":[ "v1.7.0", "v1.7.1", "v1.8.0", "v1.8.3", "v1.8.4", "v1.8.5", "v1.8.6", "v1.9.3", "v1.9.4" ] }
The text was updated successfully, but these errors were encountered:
/kind cleanup
Sorry, something went wrong.
No branches or pull requests
完善镜像数据迁移脚本,脚本做了以下的事情:
可以使用 minio 作为 S3 存储来测试, 位置可以放在本仓库的
scripts/migrate.shell
, 有疑问请随时在本 issue 回帖:)更多内容:
完善变量传参,包括 处理数据的临时目录,镜像名,远程仓库名,S3 存储相关的 地址/accessKey/accessSecret 等内容
/help
下面是目前这个脚本,基于这个脚本来完成:
tags.json
The text was updated successfully, but these errors were encountered: