Merge pull request #2747 from pikasTech/fix/nc01-registry-retention-target

收紧 NC01 registry 历史版本留存
This commit is contained in:
Lyon
2026-07-21 14:47:50 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -174,8 +174,8 @@ gc:
- node22-alpine-bun-v1
- sidecar
deletableTagPattern: ^[0-9a-f]{7,64}$
keepPerRepo: 20
minAgeHours: 48
keepPerRepo: 5
minAgeHours: 24
previewLimit: 20
estimateBlobLimit: 5000
automatic:
+1
View File
@@ -58,6 +58,7 @@
- 无论成功或失败都恢复原副本数,并复核 Deployment readiness 与 `/v2/` endpoint。
- writer idle guard 只阻塞 YAML grace 窗口内的新任务,或仍有 `Pending`/`Running` Pod 的 Tekton run;超过 grace 且没有活动 Pod 的残留 run 只报告为 stale,不得永久阻塞维护。
- 每批 manifest 上限由 YAML `automatic.maxDeleteManifestsPerRun` 控制;即使自动策略关闭,人工确认态也复用该批量边界并在每批前重新计算保护闭包。
- `keepPerRepo``minAgeHours` 只控制历史版本冗余;运行 workload refs、保护 tag/仓库和 digest closure 始终独立保护,不得因容量目标跳过。
- `--include-tool-caches`:本机和远端都必须是显式 opt-in,只清理固定 allowlist 的可重建 npm/npx/Bun 缓存;不得扩大成清理 `~/.npm``~/.bun``node_modules`、auth/config 或运行面依赖。
所有成功和失败输出都必须是 JSON。`plan` 必须标记 `dryRun=true``mutation=false``run` 必须要求 `--confirm` 并报告 `diskBefore``diskAfter``summary``results``protected`。远端 GC 可用 `--target-use-percent N` 显式表达目标根盘水位;`summary.target` 必须给出目标所需释放量、候选估算、预计水位、缺口和 `safeStop` 决策,避免靠人工心算判断是否应该继续扩大清理范围。