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
173 changes: 166 additions & 7 deletions .schema/gametemplate.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,30 @@
],
"type": "object"
},
"query": {
"description": "Query reads the online player count from a server query protocol\ninstead of the console, for games with no console that lists players\n(Valheim has no RCON at all). When set, the heartbeat's player count,\nwhich idle sleep relies on, comes from this query. The Players tab's\nlist and moderation still use the console.",
"properties": {
"port": {
"description": "Port is the UDP port, inside the pod, that answers the query: for\nValheim, 2457 (the game port plus one).",
"format": "int32",
"maximum": 65535,
"minimum": 1,
"type": "integer"
},
"protocol": {
"description": "Protocol is the query protocol. \"a2s\" is Valve's Steam server query\n(A2S_INFO over UDP), which most Steam dedicated servers answer on\ntheir query port.",
"enum": [
"a2s"
],
"type": "string"
}
},
"required": [
"port",
"protocol"
],
"type": "object"
},
"unban": {
"description": "Unban lifts a ban, e.g. \"pardon {{.Player}}\".",
"type": "string"
Expand Down Expand Up @@ -941,10 +965,28 @@
"configSchema": {
"description": "ConfigSchema declares user-tunable fields surfaced in the Create\nServer wizard. The operator resolves GameServer.spec.config\nagainst this schema (applying defaults, validating types/enums)\nand sets each resolved value as an env var on the game container.\nFields with target=file are consumed by ConfigFiles templates\ninstead of becoming env vars.",
"items": {
"anyOf": [
{
"properties": {
"applyOnRestart": {
"enum": [
false
]
}
}
},
{
"properties": {
"name": {
"pattern": "^[-._a-zA-Z0-9]+$"
}
}
}
],
"description": "ConfigField is a single user-tunable setting surfaced in the wizard.",
"properties": {
"applyOnRestart": {
"description": "ApplyOnRestart stages this environment value for the next container start.\nEdits and clears update the config Secret without rolling the game Pod.\nConfig files that reference the field are refreshed by their init container\non the next Pod start. Other fields keep their usual rollout behavior.",
"description": "ApplyOnRestart stages this environment value for the next container start.\nEdits and clears update the config Secret without rolling the game Pod.\nConfig files that reference the field are refreshed by their init container\non the next Pod start. Other fields keep their usual rollout behavior.\nName must be a valid Kubernetes Secret key. Admission enforces this rule,\nand the reconciler checks keys from previously admitted template revisions.",
"type": "boolean"
},
"autoFromMemoryLimit": {
Expand Down Expand Up @@ -982,6 +1024,12 @@
},
"type": "array"
},
"envName": {
"description": "EnvName, when set, is the env var name the value is exported as\ninstead of Name (Target \"env\" only). It lets a module keep a stable\nconfig key while pointing it at the variable the game image reads.",
"maxLength": 253,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"type": "string"
},
"max": {
"description": "Max is the maximum numeric value for int-typed fields. Bounds are\ninclusive. Ignored for non-int field types.",
"format": "int64",
Expand All @@ -1003,7 +1051,7 @@
"type": "integer"
},
"name": {
"description": "Name is the field identifier (also used as an env var when\nTarget is \"env\").",
"description": "Name is the field identifier and the key in GameServer.spec.config.\nIt is also the env var name when Target is \"env\" and EnvName is\nempty.",
"minLength": 1,
"type": "string"
},
Expand Down Expand Up @@ -1039,9 +1087,17 @@
],
"type": "object",
"x-kubernetes-validations": [
{
"message": "envName applies only to target env fields",
"rule": "!has(self.envName) || !has(self.target) || self.target == 'env'"
},
{
"message": "applyOnRestart requires an environment field",
"rule": "!has(self.applyOnRestart) || !self.applyOnRestart || !has(self.target) || self.target == 'env'"
},
{
"message": "applyOnRestart requires a Secret key name of at most 253 characters that is not '.' and does not start with '..'",
"rule": "!has(self.applyOnRestart) || !self.applyOnRestart || (size(self.name) <= 253 && self.name != '.' && !self.name.startsWith('..'))"
}
]
},
Expand Down Expand Up @@ -1444,7 +1500,19 @@
"type": "integer"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"fieldPath": ".httpGet.host",
"message": "omit httpGet.host to probe the game pod",
"rule": "!has(self.httpGet) || !has(self.httpGet.host) || self.httpGet.host == ''"
},
{
"fieldPath": ".tcpSocket.host",
"message": "omit tcpSocket.host to probe the game pod",
"rule": "!has(self.tcpSocket) || !has(self.tcpSocket.host) || self.tcpSocket.host == ''"
}
]
},
"readiness": {
"description": "Probe describes a health check to be performed against a container to determine whether it is\nalive or ready to receive traffic.",
Expand Down Expand Up @@ -1602,7 +1670,19 @@
"type": "integer"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"fieldPath": ".httpGet.host",
"message": "omit httpGet.host to probe the game pod",
"rule": "!has(self.httpGet) || !has(self.httpGet.host) || self.httpGet.host == ''"
},
{
"fieldPath": ".tcpSocket.host",
"message": "omit tcpSocket.host to probe the game pod",
"rule": "!has(self.tcpSocket) || !has(self.tcpSocket.host) || self.tcpSocket.host == ''"
}
]
},
"startup": {
"description": "Probe describes a health check to be performed against a container to determine whether it is\nalive or ready to receive traffic.",
Expand Down Expand Up @@ -1760,7 +1840,19 @@
"type": "integer"
}
},
"type": "object"
"type": "object",
"x-kubernetes-validations": [
{
"fieldPath": ".httpGet.host",
"message": "omit httpGet.host to probe the game pod",
"rule": "!has(self.httpGet) || !has(self.httpGet.host) || self.httpGet.host == ''"
},
{
"fieldPath": ".tcpSocket.host",
"message": "omit tcpSocket.host to probe the game pod",
"rule": "!has(self.tcpSocket) || !has(self.tcpSocket.host) || self.tcpSocket.host == ''"
}
]
}
},
"type": "object"
Expand Down Expand Up @@ -1928,6 +2020,10 @@
},
"type": "object"
},
"sentinelIsolation": {
"description": "SentinelIsolation restricts a wake sentinel to its own server's advertised\nports. Templates opt in after module connectivity validation; absent or\nfalse retains the legacy namespace-wide sentinel allowances.",
"type": "boolean"
},
"storage": {
"description": "Storage describes the default persistent storage layout.",
"properties": {
Expand Down Expand Up @@ -1960,6 +2056,14 @@
"items": {
"description": "ExtraVolumeSpec declares one additional persistent volume beyond a\nGameTemplate's primary data volume (see GameStorageSpec.Extra). The\noperator provisions one PVC per entry using the same mechanism as the\nprimary data PVC (create-if-absent, ReadWriteOnce, owned by the\nGameServer) under its own \"<server>-extra-<name>\" PVC name, and mounts it\ndirectly at MountPath on the game container \u2014 never nested under the\nprimary Storage.MountPath, since these exist precisely for directories\nthat share no safe common parent with it.",
"properties": {
"backupRole": {
"description": "BackupRole declares recovery scope. all-data Restic backups include data\nextras and report rebuildable extras as excluded reconstruction prerequisites.\nUnset is unclassified and rejects all-data admission. Default primary-only\nbackups and CSI snapshots still capture only the primary data claim.",
"enum": [
"data",
"rebuildable"
],
"type": "string"
},
"mountPath": {
"description": "MountPath is the absolute in-container path this volume is mounted at.",
"maxLength": 255,
Expand Down Expand Up @@ -2243,14 +2347,69 @@
"rule": "!has(self.capabilities) || !has(self.capabilities.mods) || !has(self.capabilities.mods.loaders) || size(self.capabilities.mods.loaders) == 0 || (has(self.versions) && size(self.versions) > 0)"
},
{
"message": "backupFlush requires the Minecraft Java adapter",
"rule": "!has(self.capabilities) || !has(self.capabilities.backupFlush) || self.game == 'minecraft-java'"
"message": "backupFlush requires Minecraft Java with RCON enabled",
"rule": "!has(self.capabilities) || !has(self.capabilities.backupFlush) || (self.game == 'minecraft-java' && has(self.rcon) && (!has(self.rcon.protocol) || self.rcon.protocol != 'none'))"
}
]
},
"status": {
"description": "GameTemplateStatus is intentionally minimal \u2014 templates are mostly\nstatic configuration. The operator populates ObservedGeneration so\ncontrollers reading templates can detect spec updates.",
"properties": {
"conditions": {
"description": "Conditions carry detailed state. LocalesValid reports whether the\ntranslations shipped with the module bundle were all valid.",
"items": {
"description": "Condition contains details for one aspect of the current state of this API Resource.",
"properties": {
"lastTransitionTime": {
"description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.",
"format": "date-time",
"type": "string"
},
"message": {
"description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
"format": "int64",
"minimum": 0,
"type": "integer"
},
"reason": {
"description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
"maxLength": 1024,
"minLength": 1,
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"type": "string"
},
"status": {
"description": "status of the condition, one of True, False, Unknown.",
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
"maxLength": 316,
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
"type": "string"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"type": "array"
},
"inUseCount": {
"description": "InUseCount is the number of GameServers currently referencing\nthis template.",
"format": "int32",
Expand Down
7 changes: 7 additions & 0 deletions valheim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ The Mods tab's **Search registry** mode browses the
can find and one-click install BepInEx plugins by name. **From URL** install
remains available for anything not on Thunderstore.

## Player count and idle sleep

The dashboard's player count comes from Valheim's Steam server query (A2S)
on the query port, 2457. Valheim answers it only when **List publicly**
(`SERVER_PUBLIC`) is on, the default. With it off, the server reports no
player count, and idle sleep never puts it to sleep.

## Logs (including install)

The server installs via SteamCMD on start; that output (and all runtime
Expand Down
2 changes: 1 addition & 1 deletion valheim/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: gameplane.local/module/v1
name: valheim
displayName: Valheim (Dedicated)
version: 2.3.3
version: 2.4.0
game: valheim
categories: [Survival, Co-op, Building]
summary: Valheim dedicated server (lloesche/valheim-server) with a stable/public-test channel picker, a BepInEx mod volume, and in-app Thunderstore browse. Crossplay-friendly.
Expand Down
19 changes: 14 additions & 5 deletions valheim/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ metadata:
spec:
displayName: Valheim (Dedicated)
game: valheim
version: 2.3.3
version: 2.4.0
categories: [Survival, Co-op, Building]
# Brand color the dashboard tints this game's icon/accents with.
accentColor: "#d99a2b"
Expand Down Expand Up @@ -70,8 +70,8 @@ spec:
cpu: "2"
memory: 6Gi

# Valheim doesn't speak RCON — player count flows through the status HTTP
# endpoint, so the agent uses `protocol: none`.
# Valheim doesn't speak RCON, so the agent uses `protocol: none`. The
# player count comes from the Steam query instead (capabilities.players).
rcon:
protocol: none

Expand Down Expand Up @@ -108,8 +108,8 @@ spec:
periodSeconds: 15
failureThreshold: 10

# No RCON, so no players/quiesce/status capabilities — mods only. No
# actions either: despite consoleMode: pty, research confirms the Valheim
# No RCON, so no quiesce/status capabilities, and no player list or
# moderation. No actions either: despite consoleMode: pty, research confirms the Valheim
# dedicated server binary has NO stdin command input at all — the pty
# here only streams stdout, it never reads commands back. Admin commands
# are in-game only, via the F5 console, so no quick action is possible.
Expand All @@ -118,6 +118,15 @@ spec:
capabilities:
lifecycle:
stop: ["save"]
# The player count, for the dashboard and idle sleep, from the Steam
# server query (A2S) on the query port, the game port plus one. Valheim
# answers it only when it is listed publicly (SERVER_PUBLIC, on by
# default); a server that isn't reports no player count, so it never
# sleeps.
players:
query:
protocol: a2s
port: 2457
mods:
loaders:
bepinex:
Expand Down
Loading