Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
pull_request:
paths:
- containers/**
- hack/*steamcmd_platform*.py
- .github/workflows/images.yaml
push:
branches:
- master
paths:
- containers/**
- hack/*steamcmd_platform*.py
- .github/workflows/images.yaml

permissions:
Expand Down Expand Up @@ -40,7 +42,7 @@ jobs:
- base: steamcmd
outputs:
# Pass the steamcmd base digest to downstream game jobs via ${{ needs.common-base.outputs.steamcmd-digest }}
# On PRs, digest is empty and game job uses the local tag instead.
# Only publishing runs make this digest available in the registry.
steamcmd-digest: ${{ steps.build.outputs.digest }}
steamcmd-tags: ${{ steps.meta.outputs.tags }}
steps:
Expand All @@ -56,8 +58,9 @@ jobs:
echo "::error::COSIGN_PRIVATE_KEY is required for image publishing"
exit 1
fi
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
- name: test SteamCMD platform checks
run: python3 -m unittest discover -s hack -p test_steamcmd_platform.py
# Login only when pushing to registry; skip on PRs to avoid unnecessary token operations.
# Fork PRs have read-only GITHUB_TOKEN anyway, so login would fail confusingly.
- if: github.event_name != 'pull_request'
Expand All @@ -83,17 +86,29 @@ jobs:
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: containers/common/${{ matrix.base }}
# Common base images support both architectures (Ubuntu 26.04 LTS-based).
platforms: linux/amd64,linux/arm64
# On PRs: validate multi-platform coverage without loading/pushing (buildx still fully builds).
# On master: push by digest only. The tags are attached after the
# digest is signed and verified, so a tag only ever names a signed image.
push: false
load: false
outputs: ${{ github.event_name != 'pull_request' && format('type=image,name={0},push-by-digest=true,name-canonical=true,push=true', steps.image.outputs.name) || '' }}
# The pinned foundation has amd64 userspace and the i386 SteamCMD binary.
platforms: linux/amd64
provenance: mode=max
outputs: type=oci,dest=/tmp/steamcmd-oci,tar=false
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=dev
- name: verify SteamCMD platform and executable headers
env:
DIGEST: ${{ steps.build.outputs.digest }}
run: python3 hack/check_steamcmd_platform.py /tmp/steamcmd-oci "$DIGEST"
- if: github.event_name != 'pull_request'
name: install oras
uses: oras-project/setup-oras@5e2f2482b30b0cb3e14e67f89a80c88c659a7c63 # v2.0.3
- if: github.event_name != 'pull_request'
name: publish the checked OCI index by digest
env:
DIGEST: ${{ steps.build.outputs.digest }}
IMAGE: ${{ steps.image.outputs.name }}
run: |
# An untagged destination copies the entire graph, including provenance.
oras cp --from-oci-layout "/tmp/steamcmd-oci@${DIGEST}" "$IMAGE"
test "$(oras resolve "${IMAGE}@${DIGEST}")" = "$DIGEST"
- if: github.event_name != 'pull_request'
name: install cosign
uses: sigstore/cosign-installer@756fe2d284c7292c4e9b62c8a28f1e5629c59532 # v4.1.3
Expand Down Expand Up @@ -139,9 +154,6 @@ jobs:
# Attach the tags only now that the digest carries a verified signature.
# `oras tag` points each tag at the existing manifest without rewriting
# it; the loop confirms every tag resolves to the signed digest.
- if: github.event_name != 'pull_request'
name: install oras
uses: oras-project/setup-oras@5e2f2482b30b0cb3e14e67f89a80c88c659a7c63 # v2.0.3
- if: github.event_name != 'pull_request'
name: attach tags to the signed digest
env:
Expand Down Expand Up @@ -230,7 +242,6 @@ jobs:
echo "::error::COSIGN_PRIVATE_KEY is required for image publishing"
exit 1
fi
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
# Login only when pushing to registry; skip on PRs to avoid unnecessary token operations.
# Fork PRs have read-only GITHUB_TOKEN anyway, so login would fail confusingly.
Expand Down Expand Up @@ -272,7 +283,7 @@ jobs:
DIGEST: ${{ needs.common-base.outputs.steamcmd-digest }}
EVENT: ${{ github.event_name }}
run: |
if [ -z "$DIGEST" ]; then
if [ "$EVENT" = 'pull_request' ]; then
# PR: use the named context (resolved via oci-layout:// URI passed to buildx).
base_image="gameplane-steamcmd-base:pr"
# Named context tells buildx where to find the base image built in this job.
Expand Down
3 changes: 3 additions & 0 deletions changelog/unreleased/921-steamcmd-architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SteamCMD image and worker architecture

The SteamCMD base build targets `linux/amd64`. Game templates can require a worker architecture with `spec.requiredNodeArchitecture`. On mixed clusters, set the `kubernetes.io/arch: amd64` node selector on affected GameServers that still use older templates. [Affected games and upgrade steps](../../containers/README.md#platform-support)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: backups.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: backupschedules.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: clusters.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: gameservers.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: gametemplates.gameplane.local
spec:
Expand Down Expand Up @@ -2133,6 +2133,14 @@ spec:
rule: '!has(self.authentication) || self.authentication || (!has(self.passwordSecretRef)
&& (!has(self.passwordEnv) || size(self.passwordEnv) == 0) &&
(!has(self.passwordFile) || size(self.passwordFile) == 0))'
requiredNodeArchitecture:
description: |-
RequiredNodeArchitecture is the kubernetes.io/arch label required by
the game executable (for example, amd64). Omit for portable templates.
The 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: modules.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: modulesources.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: networkcaptures.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: restores.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: backups.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: backupschedules.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: clusters.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: gameservers.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: gametemplates.gameplane.local
spec:
Expand Down Expand Up @@ -2133,6 +2133,14 @@ spec:
rule: '!has(self.authentication) || self.authentication || (!has(self.passwordSecretRef)
&& (!has(self.passwordEnv) || size(self.passwordEnv) == 0) &&
(!has(self.passwordFile) || size(self.passwordFile) == 0))'
requiredNodeArchitecture:
description: |-
RequiredNodeArchitecture is the kubernetes.io/arch label required by
the game executable (for example, amd64). Omit for portable templates.
The 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: modules.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: modulesources.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: networkcaptures.gameplane.local
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
gameplane.local/crd-bundle-sha256: bda4b96197f4f3f27d023592a02f778b653967f520cbcabb439d864890bceed7
gameplane.local/crd-bundle-sha256: 2baa2e6e380e574531191108c18a893841f7b89399fc8216fd13bc22d1a6caf8
controller-gen.kubebuilder.io/version: v0.22.0
name: restores.gameplane.local
spec:
Expand Down
12 changes: 7 additions & 5 deletions containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,13 @@ docker run -it \

## Platform support

- **Common bases** — built for `linux/amd64,linux/arm64` (Ubuntu 26.04 LTS, portable).
- **Game images** — built for `linux/amd64` only by default.
- Game server binaries (especially Unity-based, like Nuclear Option) are x86_64-only.
- ARM64 support requires a native ARM64 binary from the game publisher, which most do not officially provide.
- To add ARM64 support: obtain the ARM64 binary, update the Dockerfile and workflow matrix to build `linux/amd64,linux/arm64`.
The SteamCMD base requires `linux/amd64`. Bash and dpkg are x86-64 executables, and SteamCMD is a 32-bit Intel executable. Workers must support both x86 ABIs. The published game images in this workflow also target `linux/amd64`.

Squad, The Isle, Mount & Blade II Bannerlord and Nuclear Option inherit this base. ARK Survival Evolved moved to `hermsi/ark-server`; its catalog pin also requires amd64. On mixed clusters these games need an eligible amd64 worker with access to their volume. Check the installed GameTemplate for `spec.requiredNodeArchitecture: amd64`. For older templates, set `spec.nodeSelector["kubernetes.io/arch"]` to `amd64` on each affected GameServer. Upgrade the operator before allowing a restore, wipe, or stopped-server backup to provision local storage. Older operators can bind an empty claim on a worker outside the game's selector.

Publishing a corrected base changes future builds. Previously published indices and digest-pinned game images retain their original contents. In particular, the old common-base index `sha256:7cc7c2a9f45a6f0f69654517666de75db944e08ff110028a2586eaca77287801` advertises an ARM64 child containing Intel executables. Rebuild downstream images from the corrected signed base, record their signed digests, and update the module pins and any local overrides. Install the compatible operator and CRDs before adopting the updated module bundles.

For release qualification, start each game from its published digest and official template on a real amd64 worker with a fresh volume. Record the worker architecture, kernel, active `binfmt_misc` handlers, module version, image digest, and a successful game query or connection after first install. Include ARK's pinned vendor digest in the placement check. On a cluster with only ARM64 workers eligible, verify that Kubernetes leaves the game Pending. Attach the results to [issue #921](https://github.com/GameplanePanel/Gameplane/issues/921). An ARM64 release would also need a supported runtime for the installer and game, a successful start on that worker, and performance evidence for any emulation it requires.

## Image signing

Expand Down
13 changes: 10 additions & 3 deletions docs/module-authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,16 @@ make module-pin # rewrites every modules/*/template.yaml in place
It resolves each tag through the registry's standard bearer-token flow (any
OCI registry, not just Docker Hub), preserves the templates' comments, and
leaves any ref it cannot resolve untouched rather than guessing. The digest it
writes is the **tag manifest's** digest — for a multi-arch image that is the
index digest covering every published platform, so a pinned module still runs
on both amd64 and arm64.
writes is the **tag manifest's** digest. For a multi-arch image, this is the
index digest covering the platforms the publisher advertises.

If every supported game version requires one worker architecture, set
`spec.requiredNodeArchitecture` on the GameTemplate. For example, use `amd64`
for a game that needs the Gameplane SteamCMD base. Verify the actual installer
and server on that architecture. Kubernetes intersects the resulting
`kubernetes.io/arch` requirement with the server's placement and the operator's
worker policy. Set the module's `gameplaneMinVersion` to a release that enforces
the field so older operators reject the bundle.

Because pinning stops upstream releases from arriving on their own, the
`GameplanePanel/module` repo runs `refresh-pins.yml` monthly to re-resolve every
Expand Down
Loading
Loading