minor fix

pull/1282/head
gjmzj 2023-05-22 15:19:29 +08:00
parent c504e12624
commit 14cfebff68
3 changed files with 11 additions and 3 deletions

View File

@ -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"

8
ezdown
View File

@ -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)

View File

@ -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"'