update 镜像加速设置

pull/992/head
gjmzj 2021-01-11 22:58:59 +08:00
parent a5a99d542e
commit 7b3f5ad1df
2 changed files with 6 additions and 2 deletions

4
ezctl
View File

@ -126,6 +126,9 @@ function new() {
metricsVer=$(grep 'metricsVer=' ezdown|cut -d'=' -f2)
promChartVer=$(grep 'promChartVer=' ezdown|cut -d'=' -f2)
traefikChartVer=$(grep 'traefikChartVer=' ezdown|cut -d'=' -f2)
registryMirror=true
grep registry-mirrors /etc/docker/daemon.json > /dev/null 2>&1 || { logger debug "disable registry mirrors"; registryMirror=false; }
sed -i -e "s/__flannel__/$flannelVer/g" \
-e "s/__calico__/$calicoVer/g" \
@ -137,6 +140,7 @@ function new() {
-e "s/__dash_metrics__/$dashboardMetricsScraperVer/g" \
-e "s/__prom_chart__/$promChartVer/g" \
-e "s/__traefik_chart__/$traefikChartVer/g" \
-e "s/^ENABLE_MIRROR_REGISTRY.*$/ENABLE_MIRROR_REGISTRY: $registryMirror/g" \
-e "s/__metrics__/$metricsVer/g" "clusters/$1/config.yml"

4
ezdown
View File

@ -12,12 +12,13 @@ set -o nounset
set -o errexit
#set -o xtrace
# default version, can be overridden by cmd line options, see usage
# default settings, can be overridden by cmd line options, see usage
DOCKER_VER=19.03.14
KUBEASZ_VER=2.2.3
K8S_BIN_VER=v1.20.1
EXT_BIN_VER=0.8.1
SYS_PKG_VER=0.3.3
REGISTRY_MIRROR=CN
# images needed by k8s cluster
calicoVer=v3.15.3
@ -342,7 +343,6 @@ function main() {
[[ "$#" -eq 0 ]] && { usage >&2; exit 1; }
REGISTRY_MIRROR="CN"
ACTION=""
while getopts "CDPSd:e:k:m:p:z:" OPTION; do
case "$OPTION" in