Repository navigation
feat: CurseForge and FTB modpacks with version pinning (spec 035) - #1055
Conversation
The java8 images pin mc-image-helper 1.51.7-java8, which reads CF_API_KEY but not CF_API_KEY_FILE, so the planned key file mount would not reach the only images that need the shared key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Recorded FTB API responses (search, pack detail, version detail) and a synthetic CurseForge modpack files response for spec 035 T002. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…}/modpack
POST /servers/{name}/modpack now writes GameServer.spec.modpack instead of
patching spec.env, and returns 202 with the modpack view. GET returns the
active pack, operator phase, and backup availability. Legacy {"ref"} bodies
are still accepted as project with no pinned version.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
Strip modpack-declared env names from spec.env, render the applied provider's env, and run the Applying/Applied change state machine with the ModpackReady condition. Legacy servers without spec.modpack or status.modpack render unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Adds Filter.ProjectType; with modpack the CurseForge Versions engine also filters files client side by game version and loader tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Searches api.feed-the-beast.com, resolves pack details in bounded batches, filters by Minecraft version and loader before the page limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Add ReadFileForCluster to the agent client so the API can read a bounded file below a server's data mount. A missing file maps to ErrAgentFileNotFound. GetJSONForCluster keeps its behaviour, now sharing the target and transport resolution with the new reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Six API message ids for spec 035: five server.modpack.* errors and server.registry.share_needs_managed_key, mirrored in the English pack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
POST writes GameServer.spec.modpack (no spec.env patch) and validates version, backup destination, key sharing and in-progress changes. DELETE removes the pack via the modpack-remove annotation. GET reports missing files from MODS_NEED_DOWNLOAD.txt through the agent and adopts legacy servers lazily and at startup. Writes leave one explicit audit row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
PUT/GET /admin/registries/curseforge/share set an annotation on the managed key Secret. Enabling without a managed key answers 409, so a startup flag alone cannot be shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
New test files only; no existing test changed. The MODS_NEED_DOWNLOAD.txt sample is hand-made (no captured file exists yet). Envtest files need the envtest tag and run in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Implements spec 035 T032 (BackingUp/BackupFailed with a Backup CR), T033 (adopted-pack rendering held until stopped or quiet) and T042 (removal with optional backup, one-shot mods wipe guarded by a generation marker, annotations consumed once applied). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…oval Adds new envtest files for spec 035 T028, T029 and T039 and ticks the related tasks (T028, T029, T032, T033, T039, T042) in tasks.md. No existing test was edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…35 T038 T041 T045 T047 done Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…install The versions endpoint now forwards ?type= into the registry filter so modpack version lists resolve as modpacks. Installing a pack also clears the gameplane.local/modpack-adopted annotation, so a legacy pin no longer holds back a newly installed pack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
/files/read now serves the exact root-level .modrinth-modpack-manifest.json and .curseforge-manifest.json so the API can adopt a legacy modpack. Other dotfiles, nested dotfiles, and write, delete and list operations are unchanged; symlinks stay refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
The operator reads the backup-destination label to decide whether a destination exists for modpack removal or change backups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Add the spec 035 CurseForge, Modrinth and FTB modpack end-to-end tests: - T017, T031, T040 in modpack_e2e_test.go, registered in the bot-fast bucket - T046 blocked-mod manual download in modpack_blocked_e2e_test.go (unbucketed) - T052 FTB install in modpack_ftb_e2e_test.go (unbucketed) buckets.sh gains the bucket entries and an explicit unbucketed() list; specs.md documents the drills. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Modpack installs now write spec.modpack and return 202 instead of rendering the pack into spec.env. Update the unit, cluster and e2e assertions to match, and assert that home-cluster servers and spec.env are left untouched. Approved by valgul 2026-11-19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Rule 1 now states that removal applies to spec.env only, lists apiKeyEnv as the CRD names it, and says the applied pack's env is appended after spec.env so its values win on duplicate names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…retKeyRef The operator watches the API-managed gameplane-modreg-curseforge Secret in the control-plane namespace. When sharing is on (label, non-empty apiKey and share annotation) each server with an applied CurseForge pack gets an owned copy Secret <gs>-curseforge-key, and the game container receives the template's apiKeyEnv through valueFrom.secretKeyRef. The key value never enters the pod template, the config hash or the agent container. status.modpack.keyShared tracks whether the env is rendered. The control-plane namespace is always in the Secret cache and the Helm operator-secrets Role list, since key sharing needs namespace-local reads there in single-cluster installs too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Covers sharing on/off and rotation (copy owned by the GameServer, CF_API_KEY only via secretKeyRef, no key value in the pod template, no config-hash change on rotation), key deletion and pack removal, and no copy without a pack. Ticks T016 and T021 in specs/035-curseforge-modpacks/tasks.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…-scoped role The operator no longer caches Secrets in the control-plane namespace. Instead it reads the managed CurseForge key Secret with an uncached get (mgr.GetAPIReader()) on each reconcile. A new always-rendered Role and RoleBinding grant get on that one Secret name only, and CurseForge modpack servers requeue every 60s to pick up share toggles, key deletion or rotation. The game container's secretKeyRef is optional so a briefly missing copy Secret does not block pod start. NotFound and Forbidden are treated as "not shared". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…ying on a Secret watch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 278 files, which is 178 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. CodeRabbit couldn't verify your organization's usage billing state, so no usage-priced review was started. Retry after the billing service recovers.
|
CI Report - fb1d14brun 45045946102 - attempt 1 0 failed - 33 passed - 0 skipped - 33m33s elapsed Test selection: full (selection-rule change) - per-suite table Coverage
Changed
Slowest jobs
e2e buckets run
|
…onse bodies The i18n checker only allows <b> and <link> markup, so the modpack missing-files message now wraps the path in <b> (still rendered as code). The new modpack e2e tests close resp.Body to satisfy bodyclose. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…int) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…lper (lint) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
The share-on tests set an annotation on a managed key Secret created with share=false, whose annotations read back nil, panicking the whole controller test package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…d provider Also fix four new tests: grid role for the react-aria table, both published dates in the version picker, and the ServerDetail access and provider mocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
The three CurseForge modpack drills time out with the game container crash-looping, and the cluster dump keeps no previous logs. Print the tail of the game container's previous and current logs on failure so the image's own error shows in the test output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Fabulously Optimized is a client pack: itzg drops YACL as client-only but keeps Controlify and Zoomify, which need it, so Fabric refuses to start and the three drills time out. Essentials Mods [FABRIC] 1.0.0 for 26.1.2 boots as a dedicated server on the pinned image with the same env. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
The CurseForge pack now has about 125 jars, more than the API's mutation bucket (60 burst, 1/s refill) allows in one go, so emptying the mods folder before the Modrinth switch hit 429. Wait for Retry-After and try again, for at most five minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
POST /servers/alpha/modpack now answers 202 Pending, and the admin CurseForge share routes are mounted with the home-cluster client. Five test changes, as signed off for spec 035: - cmd/mounts_test.go: list handlers.MountRegistryShareWithOptions in homeClientMounts. - cluster_guard_test.go: mount MountRegistryShareWithOptions in mountHomeClientRoutes; TestRegistry_ServesHomeClusterOnly builds a fresh router per query and expects 202 for the modpack POST. - mod_target_test.go: map the modpack POST success status to 202; update counts unchanged. - registry_cluster_test.go (TestClusterModRoutesEnforceScopedPermissionsAndOwnership): map the modpack POST owner and collaborator success to 202; 403 cases unchanged. - registry_cluster_test.go (TestRegistryRemoteUsesSelectedTemplateAndWritesOnlySelectedServer): the remote typed client sees exactly one list of secrets with gameplane.local/backup-destination=true on the modpack POST, and zero calls on every other registry route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…eded by target A repeat install after BackupFailed now carries a new install request id and starts a fresh Backup; an unrelated spec edit no longer supersedes an in-flight change. status.modpack records target and requestId. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…sters as key not shared Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…tually Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…otation The install annotation changed metadata on a write route that must only change spec (mod_target_test status_only). Add spec.modpack.requestId, set by the API on every install POST, and drop ModpackInstallAnnotation. The operator reads it via modpackRequestID(); requestId sits outside ModpackRef so the target comparison is unaffected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…eted The Backup created before a modpack change no longer carries a controller owner reference, so deleting the GameServer keeps it and its restic snapshot, like scheduled backups. The GameServer reconciler now watches Backups with the modpack-change label and maps them to spec.serverRef. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…I fields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
Summary
Implements spec 035 (
specs/035-curseforge-modpacks): CurseForge and FTB modpacks next to Modrinth, with version pinning, change/downgrade/remove, adoption of existing packs, blocked-download handling and opt-in sharing of the admin CurseForge key.Operator
GameServer.spec.modpack/status.modpackand template provider fields (apiKeyEnv);make generate manifestsoutput included.<gs>-curseforge-keycopy,CF_API_KEYvia optionalsecretKeyRef, read through a get-onlyresourceNamesRole (<release>-operator-modreg-key); toggles apply when the server has 0 players (OD-10 A).API
POST/GET/DELETE /servers/{name}/modpack, version lists for CurseForge, Modrinth and FTB (with release type and publish date), share GET/PUT withkeySource, missing-file list from pack manifests.Agent
/files/readallows the two pack manifest dotfiles.Web
design.figwith export (T012, approved T013).Tests
Modpacks.test.tsxandendpoints_more.test.ts).Not in this PR yet
modulespointer bump: after feat(minecraft-java): CurseForge and FTB modpack providers (spec 035) module#77 merges (minecraft-java 2.13.0).🤖 Generated with Claude Code