Skip to content

Commit

Permalink
feat: K8S原生集群增加1.27.15 和1.28.11版本 (#3312)
Browse files Browse the repository at this point in the history
* 1. 获取不到默认路由时提供兜底的ip获取方式
2. 当机器上存在同名repo时不再配置新的repo

* K8S原生集群部署增加1.27.15 和1.28.11版本
  • Loading branch information
denglouping authored Jun 27, 2024
1 parent 9225c1f commit 23b7d3e
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 4 deletions.
60 changes: 60 additions & 0 deletions bcs-ops/env/offline-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,63 @@ bcs-ops:
- hub.bktencent.com/alpine/helm:3.7.2
- hub.bktencent.com/registry.k8s.io/ingress-nginx/controller:v1.3.1
- hub.bktencent.com/registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.3.0

- version: "1.27.15"
bin-tools:
k8s: "1.27.15"
cni-plugins: "1.3.0"
crictl: "1.24.2"
containerd: "1.6.21"
runc: "1.1.8"
jq: "1.6"
yq: "4.30.6"

images:
- hub.bktencent.com/registry.k8s.io/kube-apiserver:v1.27.15
- hub.bktencent.com/registry.k8s.io/kube-controller-manager:v1.27.15
- hub.bktencent.com/registry.k8s.io/kube-scheduler:v1.27.15
- hub.bktencent.com/registry.k8s.io/kube-proxy:v1.27.15
- hub.bktencent.com/registry.k8s.io/pause:3.9
- hub.bktencent.com/registry.k8s.io/etcd:3.5.12-0
- hub.bktencent.com/registry.k8s.io/coredns:v1.10.1
- hub.bktencent.com/library/hello-world:latest
- hub.bktencent.com/flannel/flannel-cni-plugin:v1.1.2
- hub.bktencent.com/flannel/flannel:v0.22.0
- hub.bktencent.com/k8s.gcr.io/sig-storage/local-volume-provisioner:v2.4.0
- hub.bktencent.com/registry.k8s.io/metrics-server/metrics-server:v0.6.3
- hub.bktencent.com/registry.k8s.io/multus-cni:snapshot
- hub.bktencent.com/registry.k8s.io/kube-vip:v0.5.12
- hub.bktencent.com/blueking/bcs-apiserver-proxy:v1.29.0-alpha.130-tencent
- hub.bktencent.com/alpine/helm:3.7.2
- hub.bktencent.com/registry.k8s.io/ingress-nginx/controller:v1.3.1
- hub.bktencent.com/registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.3.0

- version: "1.28.11"
bin-tools:
k8s: "1.28.11"
cni-plugins: "1.3.0"
crictl: "1.24.2"
containerd: "1.6.21"
runc: "1.1.8"
jq: "1.6"
yq: "4.30.6"

images:
- hub.bktencent.com/registry.k8s.io/kube-apiserver:v1.28.11
- hub.bktencent.com/registry.k8s.io/kube-controller-manager:v1.28.11
- hub.bktencent.com/registry.k8s.io/kube-scheduler:v1.28.11
- hub.bktencent.com/registry.k8s.io/kube-proxy:v1.28.11
- hub.bktencent.com/registry.k8s.io/pause:3.9
- hub.bktencent.com/registry.k8s.io/etcd:3.5.12-0
- hub.bktencent.com/registry.k8s.io/coredns:v1.10.1
- hub.bktencent.com/library/hello-world:latest
- hub.bktencent.com/flannel/flannel-cni-plugin:v1.1.2
- hub.bktencent.com/flannel/flannel:v0.22.0
- hub.bktencent.com/k8s.gcr.io/sig-storage/local-volume-provisioner:v2.4.0
- hub.bktencent.com/registry.k8s.io/metrics-server/metrics-server:v0.6.3
- hub.bktencent.com/registry.k8s.io/multus-cni:snapshot
- hub.bktencent.com/registry.k8s.io/kube-vip:v0.5.12
- hub.bktencent.com/blueking/bcs-apiserver-proxy:v1.29.0-alpha.130-tencent
- hub.bktencent.com/alpine/helm:3.7.2
- hub.bktencent.com/registry.k8s.io/ingress-nginx/controller:v1.3.1
- hub.bktencent.com/registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.3.0
14 changes: 14 additions & 0 deletions bcs-ops/k8s/install_k8s_tools
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ name=Kubernetes
baseurl=${repo_url}
enabled=1
gpgcheck=0
[kubernetes-v1.27]
name=Kubernetes
baseurl=https://mirrors.tencent.com/kubernetes_new/core%3a/stable%3a/v1.27%3a/build/rpm/
enabled=1
gpgcheck=0
[kubernetes-v1.28]
name=Kubernetes
baseurl=https://mirrors.tencent.com/kubernetes_new/core%3a/stable%3a/v1.28%3a/build/rpm/
enabled=1
gpgcheck=0
EOF
yum install -y -q yum-utils
yum-config-manager --add-repo "$ROOT_DIR/kubernetes.repo"
Expand Down Expand Up @@ -218,6 +230,8 @@ main() {
utils::log "INFO" "check kubectl status"
if kubectl version --client --short; then
utils::log "OK" "kubelet install success"
elif kubectl version --client ; then
utils::log "OK" "kubelet install success"
else
utils::log "ERROR" "Did kubectl get installed?"
fi
Expand Down
5 changes: 4 additions & 1 deletion bcs-ops/k8s/render_kubeadm
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,12 @@ main() {
1.2[2-4].*)
kubeadm_tag="v1beta3"
;;
1.2[7-8].*)
kubeadm_tag="v1beta3"
;;
*)
utils::log "FATAL" \
"Only support 1.2[0-4].x, here is :${K8S_VER}"
"Only support 1.2[0-8].x, here is :${K8S_VER}"
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion bcs-ops/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ set +x

## 安装示例

目前仅支持 k8s `1.20.15` (默认), `1.23.17` `1.24.15` 版本。
目前仅支持 k8s `1.20.15` (默认), `1.23.17` , `1.24.15` , `1.27.15`, `1.28.11`版本。

### 集群创建与节点添加

Expand Down
4 changes: 2 additions & 2 deletions bcs-ops/system/config_envfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ EOF
check_env() {
trap "utils::on_ERR;" ERR
# match k8s_ver
if ! [[ $K8S_VER =~ ^1\.2[0-4] ]]; then
if ! [[ $K8S_VER =~ ^1\.2[0-8] ]]; then
utils::log "ERROR" \
"Only support K8S_VER 1.2[0-4].x, here is :${K8S_VER}"
"Only support K8S_VER 1.2[0-8].x, here is :${K8S_VER}"
fi

# match cri and k8s_ver
Expand Down

0 comments on commit 23b7d3e

Please sign in to comment.