Skip to content

feat: production host baseline and structured change reports - #1

Draft
yuanyp8 wants to merge 19 commits into
mainfrom
feat/production-host-baseline
Draft

yuanyp8 wants to merge 19 commits into
mainfrom
feat/production-host-baseline

Conversation

@yuanyp8

@yuanyp8 yuanyp8 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

目标

把 bootstrapctl 从自由文本初始化结果逐步升级为可审计的主机状态收敛与交付报告工具,并按 Kubespray/k0sctl 的成熟经验逐项实现 Kubernetes preinstall。

已完成

  • 新增结构化 ChangeRecord:before / desired / after / effective / evidence / pending action
  • Runner 将 Check/Apply 的结构化变化合并进执行报告
  • lifecycle JSON 保存时自动生成同 RunID Markdown 交付报告
  • ulimit 区分配置文件值和当前 SSH/sudo 会话实际生效值
  • 新增 runtime-storage-audit:观测 Docker、containerd、containers/storage 的真实数据目录
  • 明确 containers/storage.conf 不等于 Docker daemon.json 或 containerd config.toml 已改写
  • 新增 host-facts:OS/发行版 family、架构、kernel、init、包管理器、cgroup、resolv.conf、DNS、默认路由、时区和 NTP
  • 增加生产主机基线重构路线文档和单元测试

当前原则

  • 借鉴 Kubespray 规则,不直接运行 Ansible playbook
  • 后续评估 rig v2 替换自研 SSH/OS/package/service 基础设施
  • Docker/containerd 配置先观测,后续通过显式 policy 做语义合并,避免覆盖用户已有配置
  • 旧任务继续兼容,新任务逐步迁移结构化证据

下一批

  • kernel/login/systemd/service 四层资源限制
  • timezone/time sync 收敛任务
  • DNS/resolv.conf 风险判断与策略
  • Kubernetes required packages 的发行版映射
  • kernel modules/sysctl 规则重构
  • rig v2 POC

当前 PR 保持 Draft,用于持续迭代与触发 CI。

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.

1 participant