diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 64df75b..2e2b6e1 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -39,6 +39,9 @@ jobs: - name: Check flush-only backup capabilities run: python3 test-backup-capabilities.py + - name: Check placement of amd64-only game images + run: python3 test-game-placement.py + - name: Run module preflight validator run: python3 validate.py diff --git a/.schema/gametemplate.schema.json b/.schema/gametemplate.schema.json index f286e39..cbd649d 100644 --- a/.schema/gametemplate.schema.json +++ b/.schema/gametemplate.schema.json @@ -1822,6 +1822,12 @@ } ] }, + "requiredNodeArchitecture": { + "description": "RequiredNodeArchitecture is the kubernetes.io/arch label required by\nthe game executable (for example, amd64). Omit for portable templates.\nThe requirement also applies to version selections and image overrides.", + "maxLength": 63, + "pattern": "^[a-z0-9]+$", + "type": "string" + }, "resources": { "description": "Resources are the default compute resources for the game container.", "properties": { diff --git a/README.md b/README.md index a85bc70..9781afd 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,20 @@ OCI game templates for Gameplane. Each `/` folder holds `module.yaml`, `template.yaml`, `README.md` and optional `icon.png`, `specs.md`, `samples/`. `build.sh push` publishes them; `validate.py` preflight-checks them in CI. +## Mixed-architecture clusters + +Squad, The Isle, Mount & Blade II: Bannerlord, Nuclear Option and ARK: Survival +Evolved pin Linux amd64 images. Their templates require an amd64 game worker. +Before installing these revisions, upgrade the GameTemplate CRD and operator to +a release that supports `spec.requiredNodeArchitecture`. This also applies when +installing a template directly with `kubectl apply`, which bypasses the module +version check. + +Existing module digests retain their original placement rules. Until you +upgrade those templates, set `spec.nodeSelector` on the affected GameServers +to include `kubernetes.io/arch: amd64` and ensure the selected worker can mount +the game's persistent volumes. + ## Translations A module can ship translations in `/locales/.json` (flat JSON, diff --git a/ark-survival-evolved/module.yaml b/ark-survival-evolved/module.yaml index a6fc99c..0ef2d4e 100644 --- a/ark-survival-evolved/module.yaml +++ b/ark-survival-evolved/module.yaml @@ -2,10 +2,10 @@ apiVersion: gameplane.local/module/v1 name: ark-survival-evolved displayName: "ARK: Survival Evolved" -version: 2.0.1 +version: 2.0.2 game: ark-survival-evolved categories: [Survival, Open World, Multiplayer, Dinosaurs] summary: "ARK: Survival Evolved with Source RCON, cluster travel, and persistent worlds. For 1.x upgrades, stop and back up first. Move 1.0 saves to /app/server/ShooterGame/Saved or the 1.1 install to /app/server, and transfers to /cluster." homepage: https://survivetheark.com/ license: MIT -gameplaneMinVersion: 0.2.0-beta.7 +gameplaneMinVersion: 0.4.1 diff --git a/ark-survival-evolved/template.yaml b/ark-survival-evolved/template.yaml index 4cee272..b91b98f 100644 --- a/ark-survival-evolved/template.yaml +++ b/ark-survival-evolved/template.yaml @@ -20,7 +20,8 @@ metadata: spec: displayName: "ARK: Survival Evolved" game: ark-survival-evolved - version: 2.0.1 + version: 2.0.2 + requiredNodeArchitecture: amd64 categories: [Survival, Open World, Multiplayer, Dinosaurs] accentColor: "#00b2e2" description: | diff --git a/mount-and-blade-2-bannerlord/module.yaml b/mount-and-blade-2-bannerlord/module.yaml index 111da67..15ff607 100644 --- a/mount-and-blade-2-bannerlord/module.yaml +++ b/mount-and-blade-2-bannerlord/module.yaml @@ -2,10 +2,10 @@ apiVersion: gameplane.local/module/v1 name: mount-and-blade-2-bannerlord displayName: "Mount & Blade II: Bannerlord" -version: 1.1.0 +version: 1.1.1 game: mount-and-blade-2-bannerlord categories: [Action, RPG, Medieval, Multiplayer] summary: "Mount & Blade II: Bannerlord dedicated multiplayer server with PTY console and match-based skirmish hosting." homepage: https://www.taleworlds.com/en/Games/Bannerlord license: MIT -gameplaneMinVersion: 0.2.0-beta.7 +gameplaneMinVersion: 0.4.1 diff --git a/mount-and-blade-2-bannerlord/template.yaml b/mount-and-blade-2-bannerlord/template.yaml index 11db2e5..8455064 100644 --- a/mount-and-blade-2-bannerlord/template.yaml +++ b/mount-and-blade-2-bannerlord/template.yaml @@ -16,7 +16,8 @@ metadata: spec: displayName: "Mount & Blade II: Bannerlord" game: mount-and-blade-2-bannerlord - version: 1.1.0 + version: 1.1.1 + requiredNodeArchitecture: amd64 categories: [Action, RPG, Medieval, Multiplayer] accentColor: "#b45309" description: | diff --git a/nuclear-option/README.md b/nuclear-option/README.md index 9901033..7496f4b 100644 --- a/nuclear-option/README.md +++ b/nuclear-option/README.md @@ -82,5 +82,5 @@ Backups capture the entire `/data` volume, so the game config and the ban list ( ## Version -- **Module version**: 1.1.0 -- **Requires Gameplane**: ≥ 0.2.0-beta.7 +- **Module version**: 1.1.1 +- **Requires Gameplane**: ≥ 0.4.1 diff --git a/nuclear-option/module.yaml b/nuclear-option/module.yaml index 379c92a..25b8a4b 100644 --- a/nuclear-option/module.yaml +++ b/nuclear-option/module.yaml @@ -2,10 +2,10 @@ apiVersion: gameplane.local/module/v1 name: nuclear-option displayName: Nuclear Option -version: 1.1.0 +version: 1.1.1 game: nuclear-option categories: [Simulation, PvP] summary: Nuclear Option dedicated server with remote-command console, runtime-downloaded via SteamCMD. homepage: https://www.nuclearoption.com/ license: MIT -gameplaneMinVersion: 0.2.0-beta.7 +gameplaneMinVersion: 0.4.1 diff --git a/nuclear-option/template.yaml b/nuclear-option/template.yaml index 9cacac6..0b40a52 100644 --- a/nuclear-option/template.yaml +++ b/nuclear-option/template.yaml @@ -28,7 +28,8 @@ spec: displayName: Nuclear Option game: nuclear-option # Kept in lockstep with module.yaml's bundle version. - version: 1.1.0 + version: 1.1.1 + requiredNodeArchitecture: amd64 categories: [Simulation, PvP] # Brand color for the dashboard. accentColor: "#ff6b6b" diff --git a/squad/module.yaml b/squad/module.yaml index c4aad39..1263954 100644 --- a/squad/module.yaml +++ b/squad/module.yaml @@ -2,10 +2,10 @@ apiVersion: gameplane.local/module/v1 name: squad displayName: Squad -version: 1.1.0 +version: 1.1.1 game: squad categories: [Shooter, Tactical, Military, Multiplayer] summary: Squad dedicated server (Unreal Engine 4) with Source-family RCON console, match-based rotation, and Steam Workshop modding support. homepage: https://joinsquad.com/ license: MIT -gameplaneMinVersion: 0.2.0-beta.7 +gameplaneMinVersion: 0.4.1 diff --git a/squad/template.yaml b/squad/template.yaml index 464acdc..6481fab 100644 --- a/squad/template.yaml +++ b/squad/template.yaml @@ -16,7 +16,8 @@ metadata: spec: displayName: Squad game: squad - version: 1.1.0 + version: 1.1.1 + requiredNodeArchitecture: amd64 categories: [Shooter, Tactical, Military, Multiplayer] accentColor: "#2d3748" description: | diff --git a/test-game-placement.py b/test-game-placement.py new file mode 100644 index 0000000..aee234f --- /dev/null +++ b/test-game-placement.py @@ -0,0 +1,20 @@ +"""Keep the audited x86 game images on compatible workers.""" + +from pathlib import Path +import unittest + +import yaml + + +class GamePlacementTest(unittest.TestCase): + def test_amd64_only_games_require_amd64_workers(self): + for game in ("ark-survival-evolved", "mount-and-blade-2-bannerlord", + "nuclear-option", "squad", "the-isle"): + with self.subTest(game=game): + path = Path(__file__).parent / game / "template.yaml" + spec = yaml.safe_load(path.read_text(encoding="utf-8"))["spec"] + self.assertEqual(spec.get("requiredNodeArchitecture"), "amd64") + + +if __name__ == "__main__": + unittest.main() diff --git a/the-isle/module.yaml b/the-isle/module.yaml index f4472bf..21b0894 100644 --- a/the-isle/module.yaml +++ b/the-isle/module.yaml @@ -2,10 +2,10 @@ apiVersion: gameplane.local/module/v1 name: the-isle displayName: The Isle -version: 1.1.0 +version: 1.1.1 game: the-isle categories: [Survival, Dinosaurs, Open World, Multiplayer] summary: The Isle dedicated server (Unreal Engine 4) with Source RCON remote administration and persistent world save management. homepage: https://findtheisle.com/ license: MIT -gameplaneMinVersion: 0.2.0-beta.7 +gameplaneMinVersion: 0.4.1 diff --git a/the-isle/template.yaml b/the-isle/template.yaml index 2d03003..b20603c 100644 --- a/the-isle/template.yaml +++ b/the-isle/template.yaml @@ -16,7 +16,8 @@ metadata: spec: displayName: The Isle game: the-isle - version: 1.1.0 + version: 1.1.1 + requiredNodeArchitecture: amd64 categories: [Survival, Dinosaurs, Open World, Multiplayer] accentColor: "#22543d" description: |