mirror of https://github.com/easzlab/kubeasz.git
更新部分组件版本
parent
dfea51fc6e
commit
8f90571234
|
@ -19,7 +19,8 @@ FELIX_LOG_LVL: "warning"
|
|||
IP_AUTODETECTION_METHOD: "can-reach={{ groups['kube-master'][0] }}"
|
||||
|
||||
# 更新支持calico 版本: [v3.2.x] [v3.3.x] [v3.4.x]
|
||||
calico_ver: "v3.4.4"
|
||||
calicoVer: "v3.8.8"
|
||||
calico_ver: "{{ calicoVer }}"
|
||||
|
||||
# calico 主版本
|
||||
calico_ver_main: "{{ calico_ver.split('.')[0] }}.{{ calico_ver.split('.')[1] }}"
|
||||
|
|
|
@ -4,7 +4,7 @@ dns_backend: "coredns"
|
|||
# 设置 dns svc ip (这里选用 SERVICE_CIDR 中第2个IP)
|
||||
CLUSTER_DNS_SVC_IP: "{{ SERVICE_CIDR | ipaddr('net') | ipaddr(2) | ipaddr('address') }}"
|
||||
kubednsVer: "1.14.13"
|
||||
corednsVer: "1.6.6"
|
||||
corednsVer: "1.6.7"
|
||||
kubedns_offline: "kubedns_{{ kubednsVer }}.tar"
|
||||
coredns_offline: "coredns_{{ corednsVer }}.tar"
|
||||
dns_offline: "{%- if dns_backend == 'coredns' -%} \
|
||||
|
@ -21,30 +21,24 @@ metricsserver_offline: "metrics-server_{{ metricsVer }}.tar"
|
|||
# dashboard 自动安装
|
||||
# dashboard v2.x.x 不依赖于heapster
|
||||
dashboard_install: "yes"
|
||||
dashboardVer: "v2.0.0-rc3"
|
||||
dashboardVer: "v2.0.0"
|
||||
dashboard_offline: "dashboard_{{ dashboardVer }}.tar"
|
||||
dashboardMetricsScraperVer: "v1.0.3"
|
||||
dashboardMetricsScraperVer: "v1.0.4"
|
||||
metricsscraper_offline: "metrics-scraper_{{ dashboardMetricsScraperVer }}.tar"
|
||||
|
||||
# ingress 自动安装,可选 "traefik" 和 "nginx-ingress"
|
||||
ingress_install: "yes"
|
||||
ingress_backend: "traefik"
|
||||
traefikVer: "v1.7.20"
|
||||
nginxingVer: "0.21.0"
|
||||
traefik_offline: "traefik_{{ traefikVer }}.tar"
|
||||
nginx_ingress_offline: "nginx_ingress_{{ nginxingVer }}.tar"
|
||||
#ingress_install: "no"
|
||||
|
||||
# metallb 自动安装
|
||||
metallb_install: "no"
|
||||
metallbVer: "v0.7.3"
|
||||
#metallb_install: "no"
|
||||
#metallbVer: "v0.7.3"
|
||||
# 模式选择: 二层 "layer2" 或者三层 "bgp"
|
||||
metallb_protocol: "layer2"
|
||||
metallb_offline: "metallb_{{ metallbVer }}.tar"
|
||||
metallb_vip_pool: "192.168.1.240/29"
|
||||
#metallb_protocol: "layer2"
|
||||
#metallb_offline: "metallb_{{ metallbVer }}.tar"
|
||||
#metallb_vip_pool: "192.168.1.240/29"
|
||||
|
||||
# efk 自动安装
|
||||
#efk_install: "no"
|
||||
|
||||
# prometheus 自动安装
|
||||
#prometheus_install: "no"
|
||||
|
||||
|
|
|
@ -108,36 +108,36 @@
|
|||
when: '"kubernetes-dashboard" not in pod_info.stdout and dashboard_install == "yes"'
|
||||
ignore_errors: true
|
||||
|
||||
- import_tasks: ingress.yml
|
||||
when: '"ingress-controller" not in pod_info.stdout and ingress_install == "yes"'
|
||||
#- import_tasks: ingress.yml
|
||||
# when: '"ingress-controller" not in pod_info.stdout and ingress_install == "yes"'
|
||||
|
||||
- block:
|
||||
- block:
|
||||
- name: 尝试推送离线 metallb镜像(若执行失败,可忽略)
|
||||
copy: src={{ base_dir }}/down/{{ metallb_offline }} dest=/opt/kube/images/{{ metallb_offline }}
|
||||
when: 'metallb_offline in download_info.stdout'
|
||||
|
||||
- name: 获取metallb离线镜像推送情况
|
||||
command: "ls /opt/kube/images"
|
||||
register: image_info
|
||||
|
||||
- name: 导入 metallb的离线镜像(若执行失败,可忽略)
|
||||
shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ metallb_offline }}"
|
||||
when: 'metallb_offline in image_info.stdout and CONTAINER_RUNTIME == "docker"'
|
||||
|
||||
- name: 导入 metallb的离线镜像(若执行失败,可忽略)
|
||||
shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ metallb_offline }}"
|
||||
when: 'metallb_offline in image_info.stdout and CONTAINER_RUNTIME == "containerd"'
|
||||
|
||||
- name: 生成 metallb 相关 manifests
|
||||
template: src=metallb/{{ item }}.j2 dest=/opt/kube/kube-system/{{ item }}
|
||||
with_items:
|
||||
- "metallb.yaml"
|
||||
- "{{ metallb_protocol }}.yaml"
|
||||
|
||||
- name: 创建 metallb controller 部署
|
||||
shell: "{{ bin_dir }}/kubectl apply -f /opt/kube/kube-system/metallb.yaml && \
|
||||
{{ bin_dir }}/kubectl apply -f /opt/kube/kube-system/{{ metallb_protocol }}.yaml"
|
||||
run_once: true
|
||||
when: '"metallb" not in pod_info.stdout and metallb_install == "yes"'
|
||||
ignore_errors: true
|
||||
#- block:
|
||||
# - block:
|
||||
# - name: 尝试推送离线 metallb镜像(若执行失败,可忽略)
|
||||
# copy: src={{ base_dir }}/down/{{ metallb_offline }} dest=/opt/kube/images/{{ metallb_offline }}
|
||||
# when: 'metallb_offline in download_info.stdout'
|
||||
#
|
||||
# - name: 获取metallb离线镜像推送情况
|
||||
# command: "ls /opt/kube/images"
|
||||
# register: image_info
|
||||
#
|
||||
# - name: 导入 metallb的离线镜像(若执行失败,可忽略)
|
||||
# shell: "{{ bin_dir }}/docker load -i /opt/kube/images/{{ metallb_offline }}"
|
||||
# when: 'metallb_offline in image_info.stdout and CONTAINER_RUNTIME == "docker"'
|
||||
#
|
||||
# - name: 导入 metallb的离线镜像(若执行失败,可忽略)
|
||||
# shell: "{{ bin_dir }}/ctr -n=k8s.io images import /opt/kube/images/{{ metallb_offline }}"
|
||||
# when: 'metallb_offline in image_info.stdout and CONTAINER_RUNTIME == "containerd"'
|
||||
#
|
||||
# - name: 生成 metallb 相关 manifests
|
||||
# template: src=metallb/{{ item }}.j2 dest=/opt/kube/kube-system/{{ item }}
|
||||
# with_items:
|
||||
# - "metallb.yaml"
|
||||
# - "{{ metallb_protocol }}.yaml"
|
||||
#
|
||||
# - name: 创建 metallb controller 部署
|
||||
# shell: "{{ bin_dir }}/kubectl apply -f /opt/kube/kube-system/metallb.yaml && \
|
||||
# {{ bin_dir }}/kubectl apply -f /opt/kube/kube-system/{{ metallb_protocol }}.yaml"
|
||||
# run_once: true
|
||||
# when: '"metallb" not in pod_info.stdout and metallb_install == "yes"'
|
||||
# ignore_errors: true
|
||||
|
|
|
@ -6,7 +6,8 @@ FLANNEL_BACKEND: "vxlan"
|
|||
DIRECT_ROUTING: false
|
||||
|
||||
#flanneld_image: "quay.io/coreos/flannel:v0.10.0-amd64"
|
||||
flanneld_image: "easzlab/flannel:v0.11.0-amd64"
|
||||
flannelVer: "v0.12.0-amd64"
|
||||
flanneld_image: "easzlab/flannel:{{ flannelVer }}"
|
||||
|
||||
# 离线镜像tar包
|
||||
flannel_offline: "flannel_v0.11.0-amd64.tar"
|
||||
flannel_offline: "flannel_{{ flannelVer }}.tar"
|
||||
|
|
|
@ -15,9 +15,9 @@ set -o errexit
|
|||
|
||||
# default version, can be overridden by cmd line options
|
||||
export DOCKER_VER=19.03.8
|
||||
export KUBEASZ_VER=2.2.0
|
||||
export KUBEASZ_VER=2.3.0
|
||||
export K8S_BIN_VER=v1.18.2
|
||||
export EXT_BIN_VER=0.4.0
|
||||
export EXT_BIN_VER=0.5.0
|
||||
export SYS_PKG_VER=0.3.3
|
||||
|
||||
function install_docker() {
|
||||
|
@ -190,7 +190,6 @@ function get_offline_image() {
|
|||
flannelVer=v0.12.0-amd64
|
||||
metricsVer=v0.3.6
|
||||
pauseVer=3.2
|
||||
traefikVer=v1.7.20
|
||||
|
||||
imageDir=/etc/ansible/down
|
||||
[[ -d "$imageDir" ]] || { echo "[ERROR] $imageDir not existed!"; exit 1; }
|
||||
|
@ -228,10 +227,6 @@ function get_offline_image() {
|
|||
docker save -o ${imageDir}/pause_${pauseVer}.tar easzlab/pause-amd64:${pauseVer}
|
||||
/bin/cp -u "${imageDir}/pause_${pauseVer}.tar" "${imageDir}/pause.tar"
|
||||
fi
|
||||
if [[ ! -f "$imageDir/traefik_$traefikVer.tar" ]];then
|
||||
docker pull traefik:${traefikVer} && \
|
||||
docker save -o ${imageDir}/traefik_${traefikVer}.tar traefik:${traefikVer}
|
||||
fi
|
||||
if [[ ! -f "$imageDir/kubeasz_$KUBEASZ_VER.tar" ]];then
|
||||
docker pull easzlab/kubeasz:${KUBEASZ_VER} && \
|
||||
docker save -o ${imageDir}/kubeasz_${KUBEASZ_VER}.tar easzlab/kubeasz:${KUBEASZ_VER}
|
||||
|
|
Loading…
Reference in New Issue