diff --git a/example/config.yml b/example/config.yml index e0e515c..21a24c8 100644 --- a/example/config.yml +++ b/example/config.yml @@ -188,7 +188,7 @@ prom_namespace: "monitor" prom_chart_ver: "__prom_chart__" # local-storage (local-path-provisioner) 自动安装 -local_path_provisioner_install: "yes" +local_path_provisioner_install: "no" local_path_provisioner_ver: "__local_path_provisioner__" # 设置默认本地存储路径 local_path_provisioner_dir: "/opt/local-path-provisioner" diff --git a/ezdown b/ezdown index 4cfd0db..78e7b6d 100755 --- a/ezdown +++ b/ezdown @@ -629,6 +629,14 @@ function start_kubeasz_docker() { docker ps -a --format="{{ .Names }}"|grep kubeasz > /dev/null 2>&1 && \ docker rm -f kubeasz > /dev/null + if [[ ! -f "$imageDir/kubeasz_$KUBEASZ_VER.tar" ]];then + logger info "downloading kubeasz: $KUBEASZ_VER" + docker pull "easzlab/kubeasz:$KUBEASZ_VER" && \ + docker save -o "$imageDir/kubeasz_$KUBEASZ_VER.tar" "easzlab/kubeasz:$KUBEASZ_VER" + else + docker load -i "$imageDir/kubeasz_$KUBEASZ_VER.tar" + fi + logger info "try to run kubeasz in a container" # get host's IP host_if=$(ip route|grep default|head -n1|cut -d' ' -f5) diff --git a/roles/cluster-addon/tasks/local-storage.yml b/roles/cluster-addon/tasks/local-storage.yml index e4cd4a7..7d3e059 100644 --- a/roles/cluster-addon/tasks/local-storage.yml +++ b/roles/cluster-addon/tasks/local-storage.yml @@ -5,9 +5,9 @@ - name: 准备 local-storage部署文件 template: src=local-storage/{{ item }}.j2 dest={{ cluster_dir }}/yml/local-storage/{{ item }} with_items: - - "local-storage.yaml" + - "local-path-storage.yaml" - "test-pod.yaml" - name: 创建 local-storage部署 - shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/local-storage/local-storage.yaml" + shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/local-storage/local-path-storage.yaml" when: 'local_path_provisioner_install == "yes"'