Ver código fonte

06k8s-install-centos.sh

lizw 2 anos atrás
pai
commit
712cb2130f
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      00base/06k8s-install-centos.sh

+ 4 - 2
00base/06k8s-install-centos.sh

@@ -2051,8 +2051,9 @@ function add::ingress() {
   # 安装 ingress-nginx
   log::info "[ingress]" "add ingress-nginx"
   command::exec "${MGMT_NODE}" "
+    $(declare -f utils::retry)
     helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
-    helm install ingress-nginx ingress-nginx/ingress-nginx \
+    utils::retry 6 helm install ingress-nginx ingress-nginx/ingress-nginx \
      --namespace ingress-nginx --create-namespace \
      --version ${INGRESS_NGINX} \
      --set controller.admissionWebhooks.patch.image.registry=registry.hub.docker.com \
@@ -2148,9 +2149,10 @@ function add::ui() {
   # 安装 rancher
   log::info "[rancher]" "add rancher"
   command::exec "${MGMT_NODE}" "
+    $(declare -f utils::retry)
     cd ${path}
     helm repo add rancher-stable http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/stable
-    helm pull rancher-stable/rancher --version ${RANCHER_VERSION} --untar
+    utils::retry 6 helm pull rancher-stable/rancher --version ${RANCHER_VERSION} --untar
     cat << EOF > rancher/templates/service.yaml
 apiVersion: v1
 kind: Service