File Explanations
1) File-by-file Reference
Path style:
- Paths are relative to the steamapp directory.
Format used below:
- Purpose: What this file is for.
- Used by: Which script or phase reads it.
- Operational notes: Important behavior, assumptions, or risks.
1.1 Steam Metadata
steamapps/appmanifest_3104830.acf- Purpose: Steam install metadata for app
3104830(build/depot/install status/size). - Used by: Human/operator troubleshooting and validation checks.
- Operational notes: Good first check when payload looks incomplete or outdated.
- Purpose: Steam install metadata for app
1.2 Battlegroup Image Payload Files
-
images/battlegroup/server.tar- Purpose: Main game server runtime image used by server sets.
- Used by:
scripts/battlegroup.shimage-load/update workflows, battlegroup spec references. - Operational notes: Largest image in this group; import can be slow and memory heavy.
-
images/battlegroup/server-bg-director.tar- Purpose: Director service image for battlegroup orchestration control.
- Used by: Battlegroup template deployments and update-from-downloads flow.
- Operational notes: Director config behavior is driven by sections embedded in
world-template.yaml.
-
images/battlegroup/server-db-utils.tar- Purpose: Database utility image for DB helper operations.
- Used by: Operator-managed DB utility routines.
- Operational notes: Often imported with other battlegroup images before applying version updates.
-
images/battlegroup/server-gateway.tar- Purpose: Gateway service image for API/service-layer ingress to battlegroup components.
- Used by: Battlegroup serverGateway component in world template.
- Operational notes: Relies on generated FLS secret and environment token wiring.
-
images/battlegroup/server-rabbitmq.tar- Purpose: RabbitMQ runtime image for admin/game message queues.
- Used by: Battlegroup message queue templates.
- Operational notes: Queue auth and TLS behavior depends on rendered RMQ/FLS secret values.
-
images/battlegroup/server-text-router.tar- Purpose: Text router runtime image tied to queue auth and service routing.
- Used by: Battlegroup textRouter component.
- Operational notes: Queue/service selector labels must match battlegroup CR expectations.
-
images/battlegroup/version.txt- Purpose: Source-of-truth battlegroup version tag.
- Used by:
scripts/battlegroup.sh update-from-downloads. - Operational notes: If missing, update-from-downloads exits with an error.
1.3 Operator image payload files
-
images/operators/battlegroup-operator.tar- Purpose: Battlegroup operator controller image.
- Used by:
scripts/setup/operator.shduring operator update. - Operational notes: Tag applied from
images/operators/version.txt.
-
images/operators/database-operator.tar- Purpose: Database operator controller image.
- Used by:
scripts/setup/operator.shupdate process. - Operational notes: Must be imported before scaling deployment.
-
images/operators/server-operator.tar- Purpose: Server operator controller image.
- Used by:
scripts/setup/operator.shupdate process. - Operational notes: Reconciles server set/group CR behavior.
-
images/operators/utilities-operator.tar- Purpose: Utilities operator controller image.
- Used by:
scripts/setup/operator.shupdate process. - Operational notes: Works alongside other operators in
funcom-operatorsnamespace.
-
images/operators/version.txt- Purpose: Target operator tag value.
- Used by:
scripts/setup/operator.shto compare and patch deployment images. - Operational notes: Missing file causes operator update to fail fast.
1.4 Prerequisite image payload files
-
images/prerequisites/coredns-coredns.tar- Purpose: CoreDNS cluster DNS image.
- Used by:
scripts/setup/k3s.shcore image load/scale phase. - Operational notes: Required before many in-cluster service lookups work reliably.
-
images/prerequisites/local-path-provisioner.tar- Purpose: PVC provisioner for local storage class.
- Used by:
scripts/setup/k3s.shbase service startup. - Operational notes: Storage behavior is node-local, not network-shared.
-
images/prerequisites/metrics-server.tar- Purpose: Metrics API backend image.
- Used by:
scripts/setup/k3s.shbase service startup. - Operational notes: Supports metric-driven visibility and some scaling dependencies.
-
images/prerequisites/cert-manager-controller.tar- Purpose: cert-manager controller image.
- Used by:
scripts/setup/k3s.sh. - Operational notes: Works with cainjector and webhook images as a set.
-
images/prerequisites/cert-manager-cainjector.tar- Purpose: cert-manager CA injector image.
- Used by:
scripts/setup/k3s.sh. - Operational notes: Handles CA injection into webhook/API resources.
-
images/prerequisites/cert-manager-webhook.tar- Purpose: cert-manager admission webhook image.
- Used by:
scripts/setup/k3s.sh. - Operational notes: Must be healthy for cert-manager API validations.
-
images/prerequisites/igw-postgres.tar- Purpose: Postgres runtime image variant referenced by world template DB config.
- Used by: Battlegroup DB deployment through operators.
- Operational notes: DB credentials and storage defaults are defined in template render.
1.5 CRD and RBAC manifest files
-
images/operators/crds/battlegroups.yaml- Purpose: Defines the main Battlegroup custom resource kind.
- Used by: Operator reconciliation and world apply phase.
- Operational notes: Without this, world CR apply fails.
-
images/operators/crds/battlegroupdirectors.yaml- Purpose: CRD for battlegroup director resources.
- Used by: Director operator logic.
- Operational notes: Supports director-specific lifecycle/status.
-
images/operators/crds/battlegroupdirectorstats.yaml- Purpose: Stats CRD for director state reporting.
- Used by: Monitoring/status paths.
- Operational notes: Primarily introspection data.
-
images/operators/crds/battlegroupstats.yaml- Purpose: Aggregated battlegroup stats CRD.
- Used by: Status queries and operator reporting.
- Operational notes: Read-heavy operational visibility object.
-
images/operators/crds/servergroups.yaml- Purpose: Server group CRD.
- Used by: Server topology reconciliation.
- Operational notes: Parent grouping around server sets.
-
images/operators/crds/serversets.yaml- Purpose: Server set CRD.
- Used by: Map-specific server runtime definition.
- Operational notes: Replica and resource behavior often driven here.
-
images/operators/crds/serversetscales.yaml- Purpose: Scale action CRD for server sets.
- Used by: Scaling operations.
- Operational notes: Useful for declarative scale requests.
-
images/operators/crds/serverstats.yaml- Purpose: Server runtime stats CRD.
- Used by:
battlegroup.sh statusviews and operational reporting. - Operational notes: Read/monitoring oriented.
-
images/operators/crds/serverrestarts.yaml- Purpose: Restart action CRD.
- Used by: Controlled restart workflows.
- Operational notes: Operational task resource.
-
images/operators/crds/servergateways.yaml- Purpose: Gateway component CRD.
- Used by: Gateway reconciliation.
- Operational notes: Depends on related secret labels and env selectors.
-
images/operators/crds/textrouters.yaml- Purpose: Text router component CRD.
- Used by: Text routing/auth reconciliation.
- Operational notes: Queue selector compatibility is critical.
-
images/operators/crds/messagequeues.yaml- Purpose: Message queue CRD.
- Used by: Admin/game queue provisioning.
- Operational notes: RMQ secret content and selector labels must match.
-
images/operators/crds/filebrowsers.yaml- Purpose: File browser component CRD.
- Used by: User settings copy workflow via pod exec/cp.
- Operational notes:
battlegroup.sh apply-default-usersettingsdepends on a ready filebrowser pod.
-
images/operators/crds/databases.yaml- Purpose: Main database CRD.
- Used by: DB provisioning within battlegroup.
- Operational notes: Credentials and storage defaults come from template.
-
images/operators/crds/databasedeployments.yaml- Purpose: Database deployment details CRD.
- Used by: DB operator internals.
- Operational notes: Deployment-level DB state control.
-
images/operators/crds/databaseutilities.yaml- Purpose: DB utility CRD.
- Used by: Utility tasks and helper operations.
- Operational notes: Often paired with db-utils image behavior.
-
images/operators/crds/databasemigrates.yaml- Purpose: DB migration action CRD.
- Used by: Schema/data migration workflows.
- Operational notes: High-impact operation object.
-
images/operators/crds/databaserestores.yaml- Purpose: DB restore action CRD.
- Used by: Restore workflows.
- Operational notes: Recovery-focused operation object.
-
images/operators/crds/databaseoperations.yaml- Purpose: Generic DB operation CRD.
- Used by: Operator task orchestration.
- Operational notes: Broad operational command surface.
-
images/operators/crds/databasebackups.yaml- Purpose: DB backup action CRD.
- Used by: Backup execution workflows.
- Operational notes: Backup destination/policy behavior depends on operator config.
-
images/operators/crds/databasebackupschedules.yaml- Purpose: Scheduled DB backup CRD.
- Used by: Recurring backup policies.
- Operational notes: Timing and retention behavior is operator-driven.
-
images/operators/crds/dataresets.yaml- Purpose: Data reset action CRD.
- Used by: Controlled reset operations.
- Operational notes: Destructive operation object; guard carefully.
-
images/operators/crds/fileoverlays.yaml- Purpose: File overlay CRD.
- Used by: Overlay-based content modifications.
- Operational notes: Useful for managed content patching.
-
images/operators/crds/cachedfileoverlays.yaml- Purpose: Cached file overlay CRD.
- Used by: Cached overlay workflows.
- Operational notes: Performance-oriented overlay layer.
-
images/operators/crds/cachedfileoverlaynodes.yaml- Purpose: Node-scoped cached overlay CRD.
- Used by: Node-level cache overlay control.
- Operational notes: Node topology matters.
-
images/operators/crds/imagepreheats.yaml- Purpose: Image preheat CRD.
- Used by: Pull-warmup workflows before runtime scale-up.
- Operational notes: Helps reduce cold-start pull delays.
-
images/operators/crds/rbac-update.yaml- Purpose: RBAC adjustments bundled with CRD/operator rollout.
- Used by:
scripts/setup/operator.shreplace/apply sequence. - Operational notes: Permission mismatches here can break reconciliation.
1.6 Script files
-
scripts/setup.sh- Purpose: Top-level deployment orchestrator for initial setup path.
- Used by: Manual operator run as primary entrypoint.
- Operational notes: Calls k3s setup, system setup, world setup, battlegroup update, and default settings apply in order.
-
scripts/battlegroup.sh- Purpose: Day-2 operations tool for battlegroups.
- Used by: Operators/admins for status, start/stop, updates, log export, and default settings copy.
- Operational notes: Requires kubectl access and expected namespace naming.
-
scripts/setup/helper.sh- Purpose: Shared utility functions for setup scripts.
- Used by:
k3s.sh,operator.sh,world.sh, and indirectlybattlegroup.shbehavior. - Operational notes: Hardcodes
/home/dune/.dunepaths and OpenRC restart commands in recovery helpers.
-
scripts/setup/k3s.sh- Purpose: Cluster bootstrap and base services bring-up.
- Used by:
scripts/setup.sh. - Operational notes: OpenRC-specific service control; imports prerequisite images and scales base deployments.
-
scripts/setup/operator.sh- Purpose: Operator image/CRD update and deployment patching.
- Used by:
k3s.shand manual operator maintenance flows. - Operational notes: Compares current deployment tag to
images/operators/version.txtbefore patching.
-
scripts/setup/world.sh- Purpose: Interactive world provisioning and apply flow.
- Used by:
scripts/setup.shduring first deployment. - Operational notes: Token parsing, secret generation, and templating happen here; writes rendered specs to
/home/dune/.duneby default.
-
scripts/setup/system.sh- Purpose: Creates convenience battlegroup symlink in dune user bin path.
- Used by:
scripts/setup.sh. - Operational notes: Expects
/home/dune/.dune/download/scriptsand/home/dune/.dune/binto exist.
-
scripts/setup/experimental_swap.sh- Purpose: Experimental swap + kubelet tuning and battlegroup memory request adjustment.
- Used by: Manual operator execution (not normal default path).
- Operational notes: Modifies host-level files and k3s config; treat as high-impact.
1.7 Template files
-
scripts/setup/templates/world-template.yaml- Purpose: Master battlegroup template rendered into world-specific CR.
- Used by:
scripts/setup/world.sh. - Operational notes: Encodes DB defaults, map/server topology, and component wiring.
-
scripts/setup/templates/fls-secret.yaml- Purpose: Secret template containing
{FLS_SECRET}placeholder. - Used by:
scripts/setup/world.shrender/apply process. - Operational notes: Labels fan out token visibility across multiple components.
- Purpose: Secret template containing
-
scripts/setup/templates/rmq-secret.yaml- Purpose: Secret template containing
{RMQ_SECRET}placeholder. - Used by:
scripts/setup/world.shrender/apply process. - Operational notes: Drives RMQ auth token distribution through labels.
- Purpose: Secret template containing
-
scripts/setup/templates/kubelet-config.yaml- Purpose: Alternate kubelet config for swap-enabled experimental mode.
- Used by:
scripts/setup/experimental_swap.sh. - Operational notes: Changes eviction/image GC and memory swap behavior.
1.8 User config defaults
-
scripts/setup/config/UserEngine.ini- Purpose: Default engine/gameplay runtime tuning.
- Used by:
battlegroup.sh apply-default-usersettings. - Operational notes: Copied into filebrowser-mounted
Saved/UserSettingspath.
-
scripts/setup/config/UserGame.ini- Purpose: Default gameplay policy settings.
- Used by:
battlegroup.sh apply-default-usersettings. - Operational notes: Same copy path and deployment mechanism as UserEngine.ini.
2) Cross-file dependency map
-
scripts/setup.shdepends on:scripts/setup/k3s.shscripts/setup/system.shscripts/setup/world.shscripts/battlegroup.sh
-
scripts/setup/k3s.shdepends on:scripts/setup/helper.shscripts/setup/operator.shimages/prerequisites/*.tar
-
scripts/setup/operator.shdepends on:scripts/setup/helper.shimages/operators/*.tarimages/operators/crds/*.yamlimages/operators/version.txt
-
scripts/setup/world.shdepends on:scripts/setup/helper.shscripts/setup/templates/world-template.yamlscripts/setup/templates/fls-secret.yamlscripts/setup/templates/rmq-secret.yaml
-
scripts/battlegroup.shdepends on:scripts/setup/helper.shscripts/setup/operator.shimages/battlegroup/*.tarimages/prerequisites/*.tarimages/battlegroup/version.txtscripts/setup/config/UserEngine.iniscripts/setup/config/UserGame.ini
3) Operational cautions
-
Init system assumption:
- OpenRC commands (
rc-service,rc-update) are built into scripts.
- OpenRC commands (
-
Path assumption:
- Several scripts hardcode
/home/dune/.duneand/home/dune/.dune/download.
- Several scripts hardcode
-
Tooling expectation:
sudo,kubectl,ctr,jq,openssl, and standard shell tools must be available.
-
Secret handling:
- Secrets are rendered by string substitution and applied directly; harden for production workflows.
-
Idempotency:
- Many operations are imperative create/patch/restart actions; repeated runs may need explicit guards/cleanup.