Skip to Content
Xeonr Developer Docs

Managed game hosting

Product-managed team namespaces, persistent execution, and CP-owned game endpoints.

These contracts are in preview. They require a deployment that enables managed hosting and a compatible operator, agent, and CSI release. A published protocol field alone does not establish that a cluster supports it.

Games uses one product-managed namespace for each team. Each game has its own persistent sandbox, exclusive world volume, execution generation, and endpoint allocations within that namespace. A team member's ordinary CP credential does not grant direct access to resources managed by the Games service. Use Games permissions and APIs to administer them.

Persistent execution

The PERSISTENT_SERVICE sandbox lifecycle separates desired power from observed execution. Creating a sandbox with desired state STOPPED reserves its logical identity without starting a game process. Installation jobs run under explicit authority for that sandbox's world before the runtime starts.

Exclusive volumes have a stable logical volume ID and a backing ID/generation. CP and CSI authorize the exact workload, pod UID, node, and execution generation before a new writable attachment is published. The supervisor separately obtains online authorization before starting the process. An unavailable control plane does not itself terminate an existing authorized game, but it cannot authorize a new writer. Do not treat Kubernetes pod deletion or a missing heartbeat as proof that a remote process has stopped.

Power operations return durable operation identities. Observe the operation and its reason before issuing a different mutation. Preserve the original request and idempotency key after a timeout: an interrupted response does not prove that the request had no effect. Stop completion requires the execution stop report and the matching CSI detach acknowledgements.

Conditional world changes

A guarded setup job can pin its volume mount to the backing it previously read. Supply volume_id with both backing_id and backing_generation from the volume readback. CP returns ABORTED if that backing has changed; it does not silently apply the operation to a moved or restored world. Omitting both backing fields resolves the current backing. The fields are preconditions, never authority to select another volume's data or bypass attachment fencing.

World editing additionally requires the stopped sandbox's execution generation, an operation-owned writer, and a content precondition. Generic filesystem writes and legacy volume archive/restore calls cannot mutate exclusive game worlds. The games.world_file_write feature revision is observed from the bundled helper on every eligible host. An older or unobserved helper keeps that feature unavailable; an installed protocol definition alone does not enable editing.

Game console

The process console addresses the existing game process. It is separate from a sandbox exec session and does not launch a shell. Requests bind the sandbox, execution generation, and run identity. A stale process identity is rejected.

Keep an ambiguous input receipt and inspect the retained output before retrying. Automatically resending a command with a new key can apply it twice. Console output remains available across normal stop/start transitions; it is distinct from the current Kubernetes pod's logs.

Public endpoints

ManagedNetworkAllocationService owns endpoint identity and forwards traffic through the configured Burrow backend. A product does not create its own public NodePort or manage Burrow credentials in the browser.

Managed network calls use the registered Games service-account subject with the containers:managed:operate scope and a fresh Auth revocation snapshot. That identity is distinct from the platform AgentOwner identity used for trusted host and operator actions; a Games service token does not become a host agent. CP also checks that the requested namespace is bound to the Games product and that the service principal has write access to that namespace. A user token or an unregistered service account cannot reserve, publish, withdraw, or release these allocations.

RPCEffect
ReserveNetworkReserves the declared role/protocol ports without publishing a target.
PublishNetworkPublishes the exact ready sandbox execution for the allocation set.
WithdrawNetworkWithdraws that execution while keeping the allocation identity.
GetNetworkReads the current allocation and publication state.
ReleaseNetworkReleases a withdrawn allocation after its sandbox has been deleted.

A transport group can pair TCP and UDP on the same public port. Query and RCON ports remain explicit roles. Compare returned allocation IDs, revisions, protocols, target ports, hostname, and public port with the requested set; a reserved endpoint is not evidence of a ready game. Network credentials are scoped to the trusted execution and mounted only into its tunnel sidecar.

Keep the advertised hostname as the connection identity. An initial host-move implementation may change the public IP. Managed k3s SQL stores cluster control state; it does not transport game-world data between hosts. Use a supported per-game relocation operation with verified data transfer and execution fencing. The legacy namespace move applies to the whole namespace and is unsuitable for moving one game among its siblings.

Host bootstrap

The host installer establishes k3s with the platform-managed external SQL datastore, then installs the assigned signed CP components. Nodes initially need direct connectivity to one another. Server and worker joins use different credential bundles: worker enrollment does not expose the SQL password or the server join secret. CSI publish authority is also separate from the host's operator credential.

For a preview distribution, obtain the installer binary, CP endpoint, and public release trust keyring from the administrator of that deployment:

sudo ./xeonr-host install create \
  --team "$TEAM_URN" --name "game-hosts" \
  --cp-url "$CP_URL" --trust-file "$RELEASE_TRUST_FILE"

Join another directly connected machine using the cluster ID returned by CP:

sudo ./xeonr-host join \
  --team "$TEAM_URN" --cluster "$CLUSTER_ID" --role worker \
  --cp-url "$CP_URL" --trust-file "$RELEASE_TRUST_FILE"

Use --role server for an additional k3s server. --node-name supplies a display name; k3s uses CP's stable node identity. An alternate Auth deployment requires --auth-issuer; a private development CA requires --ca-file. These settings do not disable certificate verification. --ca-file supplies trust to the installer only. A private-CA development profile must also bundle that public CA in its signed component images; it is not propagated automatically to cluster components. The hosted profile uses publicly trusted service certificates.

xeonr-host status reports the journaled operation. xeonr-host doctor checks local prerequisites. Keep the state directory when recovering an interrupted installation so retries preserve the original identity and idempotency keys. K3s being ready is only one stage: a hosting machine is usable after CP confirms operator, storage, and runtime capabilities as well.

Managed operator enrollment resolves its operator, agent, egress, and preview images from the cluster's assigned signed release. It does not select a newer catalog entry merely because one exists; see Upgrading a cluster's release. An unavailable release or conflicting owner/configuration binding refuses enrollment before rotating cluster material. The operator probes the assigned agent image and installed CSI capabilities before advertising support for guarded game workloads.

New managed-host operators also report operator.managed_node_admission. CP requires that capability before dispatching workloads for a managed Games namespace. For each scheduling request, CP derives the allowed Kubernetes node names from the current cluster membership, recovery epoch, signed shared and host release assignments, installation generation, and a live Ready, schedulable node observation. The operator applies those names as required metadata.name node affinity, combined with node-share and persistent-volume placement constraints. It never relies on tenant-controlled labels or a nodeName override. Hosts that are enrolled but not admitted, stale, or not ready cannot receive new workloads; a cluster with no eligible host fails the request rather than scheduling without the constraint. Operators that do not advertise this feature are not used for managed Games workloads.

ManagedClusterService.GetClusterHealth derives health from the current managed datastore, a recent authenticated operator heartbeat, and live readiness of each admitted node. A successful bootstrap report proves that an assignment was installed; it is not a substitute for current node readiness. A previously ready cluster becomes degraded when required evidence is missing or unavailable. Readiness checks do not rewrite the desired cluster configuration, and adding server nodes alone does not establish datastore high availability.

Managed clusters use UUID identities. The ordinary ClusterService.GetCluster and owner-authorized CreateEnrolmentToken methods accept that identity for inspection and operator credential recovery. Use the managed lifecycle APIs for cluster changes and removal; legacy cluster update/delete requests do not accept managed UUIDs.

Upgrading a cluster's release

A cluster keeps the signed release it was installed with until a cluster owner moves it. HostReleaseService.UpgradeClusterAssignment moves an existing cluster to a newer release on the same channel. Its request names the team, the cluster, the target manifest digest, the cluster assignment revision you read (expected_revision, from GetClusterAssignment) and an idempotency key:

{
  "team": "urn:xeonr:auth:team:…",
  "clusterId": "…",
  "sharedManifestDigest": "<target manifest sha256>",
  "expectedRevision": "1",
  "idempotencyKey": "upgrade-to-release17"
}

CP accepts the target only when it is in the deployment's verified catalog, is issued later than the current release on the same channel, keeps the same k3s version, datastore profile and critical k3s configuration, pins every managed image by digest, and declares host conformance. A host deployment in progress returns ABORTED; retry once it finishes. Changing k3s or critical configuration is not an in-place upgrade.

In one audited change (host_release.cluster_assignment_upgraded), CP advances the cluster assignment to the target and gives every host a new pending assignment for it. Each host keeps the assignment it replaced (previous) and goes on serving workloads from it. Nothing running on the cluster is restarted or moved. The response carries the new cluster assignment, every new host assignment and the operation ID. Repeating the request with the same key returns the same result.

From then on:

  • Operator re-enrollment and new enrollment tokens hand out the target release's operator, agent, egress and preview images.
  • Each host picks up its new assignment the next time it recovers or re-runs its installer, installs the target release, and reports it. When CP's live conformance check for that exact node passes, the host's previous assignment is retired.
  • Managed Games placement keeps using hosts that are still on the previous release, provided their live node still reports every required runtime and storage feature. A host that lacks one isn't eligible until it converges.
  • A further upgrade is refused until every host has finished this one.

Hosts whose assignments were written before CP recorded their installation generation are refused with "predates its installation generation". The generation backfill migration that ships with the release that adds this API repairs them; apply it before upgrading.

Host recovery and storage credentials

An interrupted installation can have healthy components but an expired bootstrap envelope. Preserve its journal. A compatible maintenance installer can use HostReleaseService.GetAssignedManifest to fetch the public signed manifest for that host's exact current assignment, verify the installed k3s binary and components, and finish the original observation and admission. This read does not return SQL passwords, join secrets, or a replacement bootstrap assignment. A changed release, host generation, or recovery epoch requires its corresponding supported recovery workflow.

Host control and CSI credentials have independent lifecycles. Owner-authorized host re-enrollment replaces host control credentials without revoking the CSI credentials that authorize storage attachments. Removing the installation can revoke both.

HostInstallationService exposes two storage credential operations:

RPCAuthorization and effect
RenewCSINodeCredentialThe bound host credential requests a publish-only CSI key for its admitted node and exact consumed bootstrap assignment. The request pins team, cluster, installation, node, role, generation, recovery epoch and an idempotency key.
ConfirmCSINodeCredentialThe newly installed CSI key authenticates confirmation of that same request. CP verifies its exact issuance before retiring older CSI credentials for the node.

Renewal returns the CSI secret over the authenticated response and stores an encrypted replay. Keep the original request and idempotency key after an interrupted response. Before replaying a host or CSI secret, CP checks the live Auth key's full owner, scope and resource binding; CSI renewal additionally pins the exact issuance, host generation and recovery epoch. An active key ID alone does not authorize replay. A missing or mismatched key is reconciled for the same request without revoking an unrelated key, and Auth unavailability cannot authorize a cached replay. Install the secret atomically in the protected node file, activate it in the CSI process, and confirm only after activation succeeds. Confirmation cannot retire host control credentials or another node's keys; a late confirmation cannot revoke a newer issuance. These APIs never grant SQL or server-join authority.

On this page