Merged
feat(deploy): enhance k8s deploy flow with cri-multiplex and static node discovery #225
fly_1997Add on Oct 14
feat(deploy): enhance k8s deploy flow with cri-multiplex and static node discovery #225
Merged
fly_1997Add on Oct 14
fly_1997
fly_1997Collaborators
Oct 14

变更摘要
本次变更聚焦 k8s 部署流程的健壮性与静态节点发现能力,围绕 cri-multiplex 部署、部署后健康自检、Harbor 证书幂等与静态节点环境变量规范化展开。核心点包括:deploy/build.sh 新增 check_deployment_health() 部署后自检并以退出码反馈结果;deploy/k8s-deploy.sh 为 cri-multiplex 自动生成 e2b 专有 CNI 配置并将 kubelet endpoint 切换改为幂等;packages/shared/pkg/clusters/discovery/static.go 将静态清单环境变量由 E2B_STATIC_ALLOCATIONS/E2B_STATIC_ALLOCATIONS_FILE 统一改名为 ORCHESTRATOR_STATIC_NODES/ORCHESTRATOR_STATIC_NODES_FILE,并同步 helm、nomad 与 API 侧引用;同时整理了 .env 模板并简化 deploy/init-client.sh 的拷贝逻辑。

主要改动

部署后健康自检:deploy/build.sh 新增 check_deployment_health(),按部署模式逐项检查容器运行时、Harbor、containerd/kubelet、节点 Ready、API /health、命名空间 Pod、orchestrator gRPC 5008 等,返回 0/1 以决定整体退出码。
静态节点发现环境变量改名:static.go 中 NewStaticDiscoveryFromEnv 改用 ORCHESTRATOR_STATIC_NODES 与 ORCHESTRATOR_STATIC_NODES_FILE(含 mtime 热加载),并同步更新 helm api.yaml、values-template.yaml、nomad/api.hcl 及相关测试中的注入变量名。
cri-multiplex 的 CNI 与 kubelet 切换:deploy/k8s-deploy.sh 在 cri-multiplex 部署时向 /etc/cni/net-e2b.d/e2b-bridge.conflist 生成 bridge+host-local 默认配置(子网 10.12.0.0/22,可用 E2B_CNI_SUBNET 覆盖),并把 switch_kubelet_endpoint 改为已切换即 return 的幂等逻辑。
Harbor 固定 HTTPS-only 与证书幂等:deploy/build.sh 移除 HARBOR_PROTOCOL/harbor_set_http_port 逻辑,改为注释 http 块并固定使用 HTTPS 端口与证书路径;install_harbor_certs 与 configure_harbor_cert_trust 在证书已存在且 cmp 一致时跳过签发与拷贝,避免覆盖正在运行的二进制/证书。
架构检测复用与幂等初始化:新增 deploy/common.sh::detect_default_arch()(x86_64→x86_64、aarch64→arm64)供 build.sh 复用;deploy/init-client.sh 增加 cd "$(dirname ...)" 并在拷贝 envd、vmlinux.bin、firecracker 时用 cmp 判等跳过,同时删除大段 firecracker 下载死代码。

likedislike
Pull Request has been successfully merged by openeuler-ci-bot.
(Thank you for fly_1997's contribution.)
fly_1997fly_1997Collaborators
Oct 14 Created pull request, commit 499233ef
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Set weibaohui,yangzhao_kl,jimmieme,duguhaotian,wonleing,zmr_2020,gaodaweiky,lu-wei-army,zhaoyifan28 as approver
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Added label: sig/sig-CloudNative
openeuler-ci-bot
openeuler-ci-botCollaborators
Oct 14 Comments:

Welcome To openEuler Community

Hey @fly_1997 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.

Contact Guide

If you have any questions, please contact the SIG: sig-CloudNative ,
and any of the maintainers: @duguhaotian, @gaodaweiky, @jimmieme, @lu-wei-army, @weibaohui, @wonleing, @yangzhao_kl, @zhaoyifan28, @zmr_2020 ,
and any of the committers: @feijianqiang, @zhourenjianz .

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Added label: openeuler-cla/yes
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/494

likedislike
fly_1997
fly_1997Collaborators
Oct 14 Comments:

/ai summary

likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Removed label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
Check Name Build Result 详情 Build Details
check_package_license ✅SUCCESS #494
check_sca ✅SUCCESS
x86_64 check_build ✅SUCCESS #497
aarch64 check_build ✅SUCCESS #513
DT check_build ✅SUCCESS #510
likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_successful
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
likedislike
fly_1997fly_1997Collaborators
Oct 14 Pre merge succeeded (commit_id: ffaaf6590d5ad7c23eb9cae830cdee89f30fb762)
fly_1997fly_1997Collaborators
Oct 14 Force-pushed 1 commits:9e894b82-feat(deploy): enhance k8s deploy flow with cri-multiplex and static node discovery
fly_1997fly_1997Collaborators
Oct 14 Pre merge succeeded (commit_id: 371a387cecde95f115f84fc8132ac7c849885806)
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Removed label: openeuler-cla/yes
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Removed label: ci_successful
openeuler-ci-bot
openeuler-ci-botCollaborators
Oct 14 Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci_successful.

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Added label: openeuler-cla/yes
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/495

likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Removed label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
Check Name Build Result 详情 Build Details
check_package_license ✅SUCCESS #495
check_sca ✅SUCCESS
x86_64 check_build ✅SUCCESS #498
aarch64 check_build ✅SUCCESS #514
DT check_build ✅SUCCESS #511
likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_successful
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
likedislike
fly_1997
fly_1997Collaborators
Oct 14 Comments:

/ai review

likedislike
fly_1997fly_1997Collaborators
Oct 14 Pre merge succeeded (commit_id: 37025f2b2c463e6c0558e311401824313ca49859)
fly_1997fly_1997Collaborators
Oct 14 Force-pushed 1 commits:7ceb4d0e-feat(deploy): enhance k8s deploy flow with cri-multiplex and static node discovery
fly_1997fly_1997Collaborators
Oct 14 Pre merge succeeded (commit_id: 93ddb90edc0f0edfd150b5ff26193f8190533ae0)
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Removed label: openeuler-cla/yes
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Added label: openeuler-cla/yes
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 14 Removed label: ci_successful
openeuler-ci-bot
openeuler-ci-botCollaborators
Oct 14 Comments:

CLA Signature Pass

fly_1997, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
openeuler-ci-bot
openeuler-ci-botCollaborators
Oct 14 Comments:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci_successful.

likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:

门禁正在运行, 您可以通过以下链接查看实时门禁检查结果.
若您对门禁结果含义不清晰或者遇到问题不知如何解决,可参考门禁指导手册
门禁入口及编码规范检查: multiarch/openeuler/trigger/KASandbox/496

likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Removed label: ci_processing
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
Check Name Build Result 详情 Build Details
check_package_license ✅SUCCESS #496
check_sca ✅SUCCESS
x86_64 check_build ✅SUCCESS #499
aarch64 check_build ✅SUCCESS #515
DT check_build ✅SUCCESS #512
likedislike
openeuler-botopeneuler-botCollaborators
Oct 14 Added label: ci_successful
openeuler-bot
openeuler-botCollaborators
Oct 14 Comments:
likedislike
fly_1997fly_1997Collaborators
Oct 15 Modify description of pull request
fly_1997
fly_1997Collaborators
Oct 15 Comments:

/ai summary

likedislike
atomgit-bot
atomgit-bot
Oct 15 Comments:

变更摘要

本次变更聚焦 k8s 部署流程的健壮性与静态节点发现能力,围绕 cri-multiplex 部署、部署后健康自检、Harbor 证书幂等与静态节点环境变量规范化展开。核心点包括:deploy/build.sh 新增 check_deployment_health() 部署后自检并以退出码反馈结果;deploy/k8s-deploy.sh 为 cri-multiplex 自动生成 e2b 专有 CNI 配置并将 kubelet endpoint 切换改为幂等;packages/shared/pkg/clusters/discovery/static.go 将静态清单环境变量由 E2B_STATIC_ALLOCATIONS/E2B_STATIC_ALLOCATIONS_FILE 统一改名为 ORCHESTRATOR_STATIC_NODES/ORCHESTRATOR_STATIC_NODES_FILE,并同步 helm、nomad 与 API 侧引用;同时整理了 .env 模板并简化 deploy/init-client.sh 的拷贝逻辑。

主要改动

  • 部署后健康自检:deploy/build.sh 新增 check_deployment_health(),按部署模式逐项检查容器运行时、Harbor、containerd/kubelet、节点 Ready、API /health、命名空间 Pod、orchestrator gRPC 5008 等,返回 0/1 以决定整体退出码。
  • 静态节点发现环境变量改名:static.go 中 NewStaticDiscoveryFromEnv 改用 ORCHESTRATOR_STATIC_NODES 与 ORCHESTRATOR_STATIC_NODES_FILE(含 mtime 热加载),并同步更新 helm api.yaml、values-template.yaml、nomad/api.hcl 及相关测试中的注入变量名。
  • cri-multiplex 的 CNI 与 kubelet 切换:deploy/k8s-deploy.sh 在 cri-multiplex 部署时向 /etc/cni/net-e2b.d/e2b-bridge.conflist 生成 bridge+host-local 默认配置(子网 10.12.0.0/22,可用 E2B_CNI_SUBNET 覆盖),并把 switch_kubelet_endpoint 改为已切换即 return 的幂等逻辑。
  • Harbor 固定 HTTPS-only 与证书幂等:deploy/build.sh 移除 HARBOR_PROTOCOL/harbor_set_http_port 逻辑,改为注释 http 块并固定使用 HTTPS 端口与证书路径;install_harbor_certs 与 configure_harbor_cert_trust 在证书已存在且 cmp 一致时跳过签发与拷贝,避免覆盖正在运行的二进制/证书。
  • 架构检测复用与幂等初始化:新增 deploy/common.sh::detect_default_arch()(x86_64→x86_64、aarch64→arm64)供 build.sh 复用;deploy/init-client.sh 增加 cd "$(dirname ...)" 并在拷贝 envd、vmlinux.bin、firecracker 时用 cmp 判等跳过,同时删除大段 firecracker 下载死代码。
likedislike
Incorrect?
fly_1997
fly_1997Collaborators
Oct 15 Comments:

/ai review

likedislike
atomgit-bot
atomgit-bot
Oct 15 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
fly_1997fly_1997Collaborators
Oct 15 Modify description of pull request
zhourenjian
zhourenjianCollaborators
Oct 15 Comments:

/lgtm
/approve

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 15 Added label: approvedlgtm
openeuler-ci-bot
openeuler-ci-botCollaborators
Oct 15 Comments:

Review Code Feedback

  • The label lgtm, approved was added to this pull request. It means that zhourenjianz reviewed the code changes. 👋
Tips
  • If this pull request is not merged while all conditions are met, comment /check-pr to try again. 😄
likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
Oct 15 Merged pull request, merge node SHA: b7a99e19a5e8bea51c9c134b519ef5e26f9a88c7