Skip to content

ci: accept site kubeconfigs in the CS capacity preflight - #506

Open
Ariznawlll wants to merge 6 commits into
mainfrom
ci/coverage-kubeconfig-preflight
Open

Ariznawlll wants to merge 6 commits into
mainfrom
ci/coverage-kubeconfig-preflight

Conversation

@Ariznawlll

Copy link
Copy Markdown
Collaborator

Scope

Accept the platform-issued standalone read-only kubeconfig as a per-site Secret in the trusted Coverage preflight. Embedded client certificates and static bearer tokens are supported; auth plugins, external file references, proxy configuration, and disabled TLS verification are rejected. The credential stays in preflight. The existing JSON source remains usable for sites without kubeconfigs; the same six read-only inventory APIs, TLS verification, freshness guard, and shared-queue fallback are unchanged.

Verification

  • 16 capacity/contract tests passed.
  • Local live JED client-certificate kubeconfig: verified capacity inventory and three JED pools.
  • Separate read-only JED hosted proof is tracked in cloudsigma-gitops. No production switch or MatrixOne workflow pin was changed.

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH 麻烦帮忙复审一下 #506(06c7f62)。用 MatrixOne #32922 做了独立的 MNL2 定向试跑:GROUP0 在 MNL2 n0、GROUP1 在 MNL2 n1,两组 Coverage UT 均通过,合并覆盖率产物已上传。这个试跑验证了定向派发和覆盖率合并,正式容量直派开关仍关闭。

@Ariznawlll

Copy link
Copy Markdown
Collaborator Author

@XuPeng-SH 麻烦复审一下 #506 的最新提交 dd8cee1。已同步 CI main,保留了 #507 的 S3 fixture 准入修复,最新工作流校验通过。

#32922 用同步前的 #506 提交 06c7f62 做了两轮隔离验收:RUH 和 MTY 都是托管预检读取实时余量后直派,两组 UT 都过了,覆盖率也已合并回传。MatrixOne 配套 #33447 已解冲突,四处引用已对齐 dd8cee1,跨仓契约通过。正式直派开关未动;等 #506 合入后再核对实际合入 SHA。

@Ariznawlll
Ariznawlll requested a review from XuPeng-SH November 29, 2026 11:25

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在 dd8cee1 上复审。静态 token 和内嵌客户端证书都通过了真实 kubectl 加本地 TLS 的验证。容量预检的等待预算需要收敛,故障注入结果和修改要求见行评审。

生产启用时请验证独立只读凭据的实际权限。四站探针使用部署环境里的 CLOUDSIGMA_KUBECONFIG 验证了 GET 可达。请用生产预检的专用身份确认所需读取成功,Secret 读取和写操作均被拒绝。 四站探针 · 部署凭据引用

Comment thread scripts/coverage_cs_capacity.py Outdated
# one shared parser allowance, not one extra wait per configured site.
using_kubeconfig = any(isinstance(configs[site], dict) and "kubeconfig" in configs[site]
for site in sites)
deadline = time.monotonic() + SNAPSHOT_SECONDS + (KUBECONFIG_PARSE_SECONDS if using_kubeconfig else 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2|一个慢站点会拖住两组 Coverage 派单。 本地故障注入让两个健康站点返回同一组可用 runner,第三站点一直卡住。Base 在约 15 秒返回,当前 JSON 路径等了约 120 秒,kubeconfig 路径等了约 130 秒。两组派单都依赖这个结果,因此即使早已有足够落点,仍要等慢站点耗完预算。

容量读取和必选准入共用 check_coverage_eligibility 的 5 分钟总预算。比如前置步骤已耗时 3 分钟时,130 秒采集会触发整个 job 的超时,continue-on-error 也无法让共享队列接手。

请为可选采集保留短的共享总预算,并在已有足够可用落点时尽早返回。请用一个慢站点与两个健康站点的组合验证派单可继续,同时覆盖容量读取耗尽预算时的共享队列兜底。 准入 job

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants