-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathvariables.yml
152 lines (143 loc) · 13.2 KB
/
variables.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# ----------------------- 版本设置 -----------------------
crictl_version: "v1.23.0"
runc_version: "v1.1"
pause_version: "{% if kube_version is version('v1.22.0', '<=') %}3.2{% else %}3.5{% endif %}"
busybox_version: "1.28"
cni_version: "v0.8.6"
npd_version: "v0.8.1"
# ----------------------- 容器镜像地址 ---------------------
# coredns
coredns_image_name: "{{ dns_repository_hostname }}:{{ registry_port }}/coredns"
# dns-cache
dns_cache_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/k8s-dns-node-cache:{{ dns_cache_version }}"
# Pod image 地址
pod_infra_container_image: "k8s.gcr.io/pause:{{ pause_version }}"
# 基础容器 image 地址
sandbox_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/pause:{{ pause_version }}"
# busybox_image image 地址
busybox_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/busybox:{{ busybox_version }}"
# calico 相关镜像
calico_typha_image: "{{ dns_repository_hostname }}:{{ registry_port }}/calico/typha:{{ calico_version }}"
calico_cni_image: "{{ dns_repository_hostname }}:{{ registry_port }}/calico/cni:{{ calico_version }}"
calico_node_image: "{{ dns_repository_hostname }}:{{ registry_port }}/calico/node:{{ calico_version }}"
calico_kube_controllers_image: "{{ dns_repository_hostname }}:{{ registry_port }}/calico/kube-controllers:{{ calico_version }}"
calico_pod2daemon_flexvol_image: "{{ dns_repository_hostname }}:{{ registry_port }}/calico/pod2daemon-flexvol:{{ calico_version }}"
# flannel image 地址
flannel_image: "{{ dns_repository_hostname }}:{{ registry_port }}/coreos/flannel:{{ flannel_version }}"
# cilium image 地址
cilium_image: "{{ dns_repository_hostname }}:{{ registry_port }}/cilium/cilium:{{ cilium_version }}"
cilium_operator_image: "{{ dns_repository_hostname }}:{{ registry_port }}/cilium/operator-generic:{{ cilium_version }}"
# ingress-controller 镜像地址
nginx_ingress_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/ingress-nginx-controller:{{ nginx_ingress_version }}"
traefik_ingress_image: "{{ dns_repository_hostname }}:{{ registry_port }}/traefik:{{ traefik_ingress_version }}"
# ceph-rbd provisioner
rbd_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/external_storage/rbd-provisioner:{{ rbd_provisioner_version }}"
# ceph-fs provisioner
fs_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/external_storage/cephfs-provisioner:{{ fs_provisioner_version }}"
# nfs provisioner
nfs_client_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/nfs-client-provisioner:{{ nfs_provisioner_version }}"
# rook-ceph
ceph_image: "{{ dns_repository_hostname }}:{{ registry_port }}/ceph/ceph:{{ ceph_version }}"
rook_ceph_image: "{{ dns_repository_hostname }}:{{ registry_port }}/rook/ceph:{{ rook_ceph_version }}"
rook_csi_ceph_image: "{{ dns_repository_hostname }}:{{ registry_port }}/cephcsi/cephcsi:{{ rook_csi_ceph_version }}"
rook_csi_registrar_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/csi-node-driver-registrar:{{ rook_csi_node_driver_registrar_version }}"
rook_csi_resizer_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/csi-resizer:{{ rook_csi_resizer_version }}"
rook_csi_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/csi-provisioner:{{ rook_csi_provisioner_version }}"
rook_csi_snapshotter_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/csi-snapshotter:{{ rook_csi_snapshotter_version }}"
rook_csi_attacher_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/csi-attacher:{{ rook_csi_attacher_version }}"
# metrics-server image
metrics_server_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/metrics-server:{{ metrics_server_version }}"
# npd image 地址
npd_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/node-problem-detector:{{ npd_version }}"
# helm2 tiller image
tiller_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/tiller:{{ helm_v2_version }}"
# huawei-csi
huawei_csi_driver_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/huawei-csi:{{ huawei_csi_driver_version }}"
huawei_csi_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-provisioner:{{ huawei_csi_provisioner_version }}"
huawei_csi_attacher_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-attacher:{{ huawei_csi_attacher_version }}"
huawei_csi_node_driver_registrar_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-node-driver-registrar:{{ huawei_csi_node_driver_registrar_version }}"
# vsphere-csi
vsphere_csi_attacher_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-attacher:{{ vsphere_csi_attacher_version }}"
vsphere_csi_resizer_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-resizer:{{ vsphere_csi_resizer_version }}"
vsphere_csi_driver_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-driver:{{ vsphere_csi_version }}"
vsphere_csi_livenessprobe_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-livenessprobe:{{ vsphere_csi_livenessprobe_version }}"
vsphere_csi_syncer_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-syncer:{{ vsphere_csi_version }}"
vsphere_csi_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-provisioner:{{ vsphere_csi_provisioner_version }}"
vsphere_csi_snapshotter_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-snapshotter:{{ vsphere_csi_snapshotter_version }}"
vsphere_csi_node_driver_registrar_image: "{{ dns_repository_hostname }}:{{ registry_port }}/kubeoperator/vsphere-csi-node-driver-registrar:{{ vsphere_csi_node_driver_registrar_version }}"
# cinder
cinder_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scloudprovider/cinder-csi-plugin:{{ cinder_csi_version }}"
cinder_csi_attacher_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-attacher:{{ cinder_csi_attacher_version }}"
cinder_csi_provisioner_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-provisioner:{{ cinder_csi_provisioner_version }}"
cinder_csi_snapshotter_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-snapshotter:{{ cinder_csi_snapshotter_version }}"
cinder_csi_resizer_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-resizer:{{ cinder_csi_resizer_version }}"
cinder_csi_livenessprobe_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/livenessprobe:{{ cinder_csi_livenessprobe_version }}"
cinder_csi_registrar_image: "{{ dns_repository_hostname }}:{{ registry_port }}/k8scsi/csi-node-driver-registrar:{{ cinder_csi_node_driver_registrar_version }}"
# nvidia gpu
nvidia_k8s_device_plugin: "{{ dns_repository_hostname }}:{{ registry_port }}/nvidia/k8s-device-plugin:1.0.0-beta"
# ----------------------- 集群参数设置 ---------------------------
# cni bin dir
cni_bin_dir: "/opt/cni/bin"
# dns cache
pillar_local_dns: "169.254.20.10"
# Etcd 备份文件名称
etcd_snapshot_name: "etcd-snapshot.db"
# Binaries Directory
bin_dir: "/usr/local/bin"
# Deploy Directory (ansible workspace)
base_dir: "/opt/kubeoperator"
# 集群 manifest 配置文件存放目录
kube_config_dir: "/etc/kubernetes"
# 在线模式文件下载超时时间,默认15 min
download_timeout_online: "900"
# 仓库地址
dns_repository_hostname: "registry.kubeoperator.io"
# 加入集群token
kubeadm_token: "abcdef.0123456789abcdef"
# Kubelet 根目录
kubelet_root_dir: "/var/lib/kubelet"
# 应用dns域名
app_domain: "kubeoperator.org"
# kubernetes组件预留资源
kube_cpu_reserved: "100m"
kube_memory_reserved: "256M"
kube_ephemeral_storage_reserved: "1G"
# 资源保留相关配置
eviction_hard_imagefs_available: "15%"
eviction_hard_memory_available: "100Mi"
eviction_hard_nodefs_available: "10%"
eviction_hard_nodefs_inodes_free: "5%"
# vsphere
cloud_config_dir: "/etc/kubernetes/cloud-config"
# ----------------------- k8s 二进制文件下载地址 --------------------
k8s_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/k8s.tar.gz"
etcd_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/etcd/{{ etcd_version }}/{{ architectures }}/etcd-{{ etcd_version }}-linux-{{ architectures }}.tar.gz"
cni_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/containernetworking/{{ cni_version }}/{{ architectures }}/cni-plugins-linux-{{ architectures }}-{{ cni_version }}.tgz"
docker_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/docker/{{ docker_version }}/{{ architectures }}/docker-{{ docker_version }}.tgz"
containerd_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/containerd/{{ containerd_version }}/{{ architectures }}/containerd-{{ containerd_version }}-linux-{{ architectures }}.tar.gz"
crictl_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/crictl/{{ crictl_version }}/{{ architectures }}/crictl-{{ crictl_version }}-linux-{{ architectures }}.tar.gz"
runc_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/runc/{{ runc_version }}/{{ architectures }}/runc.{{ architectures }}"
calicoctl_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/calicoctl/{{ calico_version }}/calicoctl-linux-{{ architectures }}"
# ----------------------- 离线镜像文件下载地址 ----------------------
kube_controller_manager_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/kube-controller-manager.tar"
kube_apiserver_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/kube-apiserver.tar"
kube_scheduler_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/kube-scheduler.tar"
kube_proxy_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/kube-proxy.tar"
pause_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_version }}/{{ architectures }}/pause.tar"
# ----------------------- k8s 升级二进制文件及镜像下载地址 -------------
k8s_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/k8s.tar.gz"
kube_controller_manager_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/kube-controller-manager.tar"
kube_apiserver_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/kube-apiserver.tar"
kube_scheduler_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/kube-scheduler.tar"
kube_proxy_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/kube-proxy.tar"
pause_upgrade_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/k8s/{{ kube_upgrade_version }}/{{ architectures }}/pause.tar"
# ----------------------- 存储所需二进制文件下载地址 --------------------
govc_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/govc/{{ govc_version }}/{{ architectures }}/govc_linux_{{ architectures }}.gz"
huawei_csi_passwdencrypt_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/oceanstor/{{ architectures }}/passwdEncrypt"
# ----------------------- helm 仓库地址 --------------------
helm2_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/helm/{{ helm_v2_version }}/helm-{{ helm_v2_version }}-linux-{{ architectures }}.tar.gz"
helm3_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/helm/{{ helm_v3_version }}/helm-{{ helm_v3_version }}-linux-{{ architectures }}.tar.gz"
# ----------------------- chrony 下载地址 --------------------
chrony_download_url: "{{ registry_protocol }}://{{ dns_repository_hostname }}:{{ repo_port }}/repository/oss-proxy/chrony/{{ architectures }}/chrony_xenial.tar.gz"
# ----------------------- 集群名称样式(ip,hostname) --------------------
cluster_name_style: "{% if hostvars[inventory_hostname]['ansible_ssh_host'] is defined %}hostname{% else %}ip{% endif %}"