Skip to content

feat(jvm): stage startup settings and preview effective heap sizes - #943

Open
Baylem wants to merge 5 commits into
masterfrom
feat/938-jvm-startup-settings
Open

Baylem wants to merge 5 commits into
masterfrom
feat/938-jvm-startup-settings

Conversation

@Baylem

@Baylem Baylem commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Closes #938. Companion catalog change: GameplanePanel/module#66.

Startup settings

A template can mark an environment field with applyOnRestart: true. The operator installs a stable optional Secret reference for that field and stages its resolved value in the GameServer-owned Secret. Editing or clearing that field leaves the running Pod's environment and template intact. Ordinary settings retain their rollout behavior. Files interpolating a staged field are copied by the existing init container on the next Pod start. Adopting the template on an existing server can restart it once.

Settings reads the server's admitted template, including when a newer catalog revision is pending. The Minecraft Java startup group exposes the options declared by that schema. For the itzg image, it shows the independently resolved heap arguments, including percentage modes, and checks the initial heap against the maximum. On a 4Gi server with a 75% automatic initial heap and a 2G maximum, the preview shows 3072M and blocks the invalid save. The restart notice follows the edited fields and distinguishes initial adoption.

Verification

  • The focused operator materialization and API snapshot/permission tests passed.
  • The dashboard and end-to-end TypeScript builds passed, together with 52 tests across Settings, Game configuration and screenshot handlers. Chrome captured both JVM screens at 2×. Each passed the standard Pencil comparison and pseudo-locale clipping checks.
  • The published 0.3.0-to-current Helm upgrade passed on Kind. It preserved the game PVC and database migrations. Editing and clearing a staged option preserved the running Pod UID, StatefulSet template and process environment. Each explicit restart picked up the saved setting. Uninstall and reinstall also passed with the old CRDs left in place.
  • The chart CRD copies and bundle hash were regenerated. The companion module validates its startup options with the pinned image launcher.

Catalog delivery

Ship the CRD and operator before publishing Minecraft Java 2.12.0. When the module change has merged, advance the catalog submodule to the merged revision and publish the signed bundle through the release or republish workflow. Existing OnRequest servers can schedule their template adoption.

@Baylem
Baylem requested a review from ValgulNecron as a code owner November 12, 2026 05:18
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e3826d8 and fe0c50e.

Files ignored due to path filters: 3

  • assets/design-export/screenshots/KJdxg.png is excluded by !**/*.png
  • assets/design-export/screenshots/ZUAq1.png is excluded by !**/*.png
  • design.pen is excluded by !**/*.pen
Files selected for processing: 45

  • api/docs/openapi.yaml
  • api/internal/handlers/config_redact_revision_test.go
  • api/internal/handlers/resources.go
  • api/specs.md
  • assets/design-export/MANIFEST.md
  • assets/design-export/json/KJdxg.json
  • assets/design-export/json/ZUAq1.json
  • changelog/unreleased/938-jvm-startup.md
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_backups.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_backupschedules.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_clusters.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_gameservers.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_gametemplates.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_modules.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_modulesources.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_networkcaptures.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_restores.yaml
  • charts/gameplane/crd-manifests/gameplane.local_backups.yaml
  • charts/gameplane/crd-manifests/gameplane.local_backupschedules.yaml
  • charts/gameplane/crd-manifests/gameplane.local_clusters.yaml
  • charts/gameplane/crd-manifests/gameplane.local_gameservers.yaml
  • charts/gameplane/crd-manifests/gameplane.local_gametemplates.yaml
  • charts/gameplane/crd-manifests/gameplane.local_modules.yaml
  • charts/gameplane/crd-manifests/gameplane.local_modulesources.yaml
  • charts/gameplane/crd-manifests/gameplane.local_networkcaptures.yaml
  • charts/gameplane/crd-manifests/gameplane.local_restores.yaml
  • docs/module-authoring.md
  • i18n/locales/en/app.json
  • operator/api/v1alpha1/gametemplate_types.go
  • operator/config/crd/gameplane.local_gametemplates.yaml
  • operator/internal/controller/gameserver_config.go
  • operator/internal/controller/gameserver_config_test.go
  • operator/specs.md
  • test/e2e/upgrade_e2e_test.go
  • web/e2e/screenshots/slice-gameconfig.spec.ts
  • web/specs.md
  • web/src/lib/endpoints.ts
  • web/src/lib/jvmStartup.ts
  • web/src/routes/tabs/Settings.test.tsx
  • web/src/routes/tabs/Settings.tsx
  • web/src/routes/tabs/settings/GameConfig.test.tsx
  • web/src/routes/tabs/settings/GameConfig.tsx
  • web/src/test/handlers.ts
  • web/src/test/screenshotData.ts
  • web/src/types.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Signed-off-by: Baylem <zelathis@gmail.com>
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

CI Report - 6b2e373

run 43163065380 - attempt 1

0 failed - 0 passed - 0 skipped - 33 cancelled - 2m18s elapsed

Test selection: unknown - per-suite table

Coverage

no coverage/* commit statuses found on 6b2e373

Changed

Area Files +/-
assets/ 5 +1162/-0
(root) 1 +1157/-1
web/ 11 +296/-15
test/ 1 +117/-1
operator/ 5 +101/-11
api/ 4 +59/-0
charts/ 18 +40/-18
i18n/ 1 +32/-0
docs/ 1 +11/-3
changelog/ 1 +7/-0

Slowest jobs

Job Duration
detect changes 2m17s
telemetry default gate 2m17s
move parity (spec 028) 2m17s
standalone Compose smoke 0s
e2e bucket coverage 0s

e2e buckets run

bot-fast, multicluster, upgrade

@Baylem Baylem self-assigned this Nov 12, 2026

@Baylem Baylem left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The full previous-release upgrade suite passed on this commit in a fresh Kind cluster, starting from published Gameplane 0.3.0. It exercised template adoption, then staged an edit and a clear. The running pod kept its UID, pod template and environment after each save. Each explicit restart loaded the expected value. Database migrations, retained data and the final reinstall with stale CRDs also passed.

Reviewed preview behavior against the pinned launcher. The dashboard detects a 3072M automatic initial heap above a 2G maximum on a 4 GiB server, resolves the MEMORY fallback for a partial schema, and suppresses image-specific flags for an overridden entrypoint. The next-start notice checks the running revision. Both settings suites passed all 50 tests. The Pencil exports cover valid settings and the invalid automatic-heap state.

Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>

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.

Add schema-aware Minecraft JVM settings and deferred environment updates

1 participant