fix: 将运行中的 agent 状态收敛为幂等

This commit is contained in:
pikastech
2026-07-20 04:44:08 +02:00
parent 19cfec7e79
commit 657524bd1a
3 changed files with 16 additions and 6 deletions
+1
View File
@@ -354,6 +354,7 @@ bun scripts/cli.ts hwlab nodes control-plane legacy-cicd --help
- k3s drop-in 未变化且节点容量已收敛时必须 `mutation=false`;禁止无条件重启、重装、强写或通过 CI 自动覆盖同一节点配置。
- WireGuard 配置一致时不得 restart;k3s API/容量暂时不可读时保持 unknown 并停止 mutation,禁止把控制通道抖动解释为配置漂移。
- worker agent 只在 YAML 派生摘要变化或 service 未运行时安装/恢复,不得在每次集群 apply 中先卸载再重装。
- `Type=notify` agent 的 `activating` 且 MainPID 存在属于运行中;节点 Ready 时不得仅因 systemd 未进入 `active` 而重复重装。
- worker 必须先由集群入口按 `hostProxyConfigRef` 部署并验证 proxy client,再启动 agentcontainerd 通过该 proxy 直接访问上游 registry,禁止用公共 registry mirror 代替出网链路。
- worker 安装使用短启动并由 control-plane Node Ready 轮询收口,禁止让 `trans`/SSH 长挂等待 systemd notify。
- worker 加入集群不改变 PaC consumer 的 source commit authority,也不授权人工 PipelineRun、Argo sync 或业务 rollout。