forked from DaoCloud/public-image-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update domain of k8s * Update mirror * Remove registry.k8s.io/kube-registry-proxy-amd64
- Loading branch information
Showing
3 changed files
with
70 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters