mirror of https://github.com/easzlab/kubeasz.git
cluster-addon: 自动安装traefik,调整dashboard离线安装
parent
533aa7e9d0
commit
c849650112
|
@ -17,23 +17,21 @@ metricsVer: "v0.3.2"
|
||||||
metricsserver_offline: "metrics-server_{{ metricsVer }}.tar"
|
metricsserver_offline: "metrics-server_{{ metricsVer }}.tar"
|
||||||
|
|
||||||
# dashboard 自动安装
|
# dashboard 自动安装
|
||||||
|
# 现阶段 dashboard 获取metrics仍旧依赖于heapster,因此需连带安装heapster
|
||||||
dashboard_install: "yes"
|
dashboard_install: "yes"
|
||||||
dashboardVer: "v1.10.1"
|
dashboardVer: "v1.10.1"
|
||||||
dashboard_offline: "dashboard_{{ dashboardVer }}.tar"
|
dashboard_offline: "dashboard_{{ dashboardVer }}.tar"
|
||||||
|
heapsterVer: "v1.5.4"
|
||||||
|
heapster_offline: "heapster_{{ heapsterVer }}.tar"
|
||||||
|
|
||||||
# ingress 自动安装,可选 "traefik" 和 "nginx-ingress"
|
# ingress 自动安装,可选 "traefik" 和 "nginx-ingress"
|
||||||
ingress_install: "no"
|
ingress_install: "yes"
|
||||||
ingress_backend: "traefik"
|
ingress_backend: "traefik"
|
||||||
traefikVer: "v1.7.11"
|
traefikVer: "v1.7.12"
|
||||||
nginxingVer: "0.21.0"
|
nginxingVer: "0.21.0"
|
||||||
traefik_offline: "traefik_{{ traefikVer }}.tar"
|
traefik_offline: "traefik_{{ traefikVer }}.tar"
|
||||||
nginx_ingress_offline: "nginx_ingress_{{ nginxingVer }}.tar"
|
nginx_ingress_offline: "nginx_ingress_{{ nginxingVer }}.tar"
|
||||||
|
|
||||||
# heapster 自动安装
|
|
||||||
heapster_install: "no"
|
|
||||||
heapsterVer: "v1.5.4"
|
|
||||||
heapster_offline: "heapster_{{ heapsterVer }}.tar"
|
|
||||||
|
|
||||||
# metallb 自动安装
|
# metallb 自动安装
|
||||||
metallb_install: "no"
|
metallb_install: "no"
|
||||||
metallbVer: "v0.7.3"
|
metallbVer: "v0.7.3"
|
||||||
|
|
|
@ -88,21 +88,30 @@
|
||||||
# 现阶段 dashboard 获取metrics仍旧依赖于heapster,因此需连带安装heapster
|
# 现阶段 dashboard 获取metrics仍旧依赖于heapster,因此需连带安装heapster
|
||||||
- block:
|
- block:
|
||||||
- block:
|
- block:
|
||||||
- name: 尝试推送离线 dashboard镜像(若执行失败,可忽略)
|
- name: 尝试推送离线 dashboard heapster镜像(若执行失败,可忽略)
|
||||||
copy: src={{ base_dir }}/down/{{ dashboard_offline }} dest=/opt/kube/images/{{ dashboard_offline }}
|
copy: src={{ base_dir }}/down/{{ item }} dest=/opt/kube/images/{{ item }}
|
||||||
when: 'dashboard_offline in download_info.stdout'
|
when: 'item in download_info.stdout'
|
||||||
|
with_items:
|
||||||
|
- "{{ dashboard_offline }}"
|
||||||
|
- "{{ heapster_offline }}"
|
||||||
|
|
||||||
- name: 获取dashboard离线镜像推送情况
|
- name: 获取dashboard离线镜像推送情况
|
||||||
command: "ls /opt/kube/images"
|
command: "ls /opt/kube/images"
|
||||||
register: image_info
|
register: image_info
|
||||||
|
|
||||||
- name: 导入 dashboard的离线镜像(若执行失败,可忽略)
|
- name: 导入 dashboard heapster的离线镜像(docker)
|
||||||
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ dashboard_offline }}"
|
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ item }}"
|
||||||
when: 'dashboard_offline in image_info.stdout and CONTAINER_RUNTIME == "docker"'
|
with_items:
|
||||||
|
- "{{ dashboard_offline }}"
|
||||||
|
- "{{ heapster_offline }}"
|
||||||
|
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'docker'"
|
||||||
|
|
||||||
- name: 导入 dashboard的离线镜像(若执行失败,可忽略)
|
- name: 导入 dashboard heapster的离线镜像(containerd)
|
||||||
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ dashboard_offline }}"
|
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ item }}"
|
||||||
when: 'dashboard_offline in image_info.stdout and CONTAINER_RUNTIME == "containerd"'
|
with_items:
|
||||||
|
- "{{ dashboard_offline }}"
|
||||||
|
- "{{ heapster_offline }}"
|
||||||
|
when: "item in image_info.stdout and CONTAINER_RUNTIME == 'containerd'"
|
||||||
|
|
||||||
- name: 创建 dashboard部署
|
- name: 创建 dashboard部署
|
||||||
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/dashboard && \
|
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/dashboard && \
|
||||||
|
|
Loading…
Reference in New Issue