mirror of
https://github.com/DaoCloud/public-image-mirror.git
synced 2025-08-06 20:19:28 +08:00
Update domain of k8s (#170)
* Update domain of k8s * Update mirror * Remove registry.k8s.io/kube-registry-proxy-amd64
This commit is contained in:
23
hack/verify-k8s-prefix.sh
Executable file
23
hack/verify-k8s-prefix.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
file=$1
|
||||
|
||||
cp ${file} ${file}.bak
|
||||
|
||||
cat ${file} | grep k8s.gcr.io/ | sed 's#k8s.gcr.io/#registry.k8s.io/#' >>${file}.bak
|
||||
|
||||
$(dirname "${BASH_SOURCE}")/fmt.sh ${file}.bak
|
||||
|
||||
result=$(diff ${file} ${file}.bak)
|
||||
|
||||
if [[ "${result}" != "" ]]; then
|
||||
echo "Usually registry.k8s.io/* instead of k8s.gcr.io/*"
|
||||
echo "Please run following command to fix the issue:"
|
||||
echo "cat ${file} | sed 's#k8s.gcr.io/#registry.k8s.io/#' >${file}.bak"
|
||||
echo "mv ${file}.bak ${file}"
|
||||
echo "./hack/fmt.sh ${file}"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm ${file}.bak
|
Reference in New Issue
Block a user