Add Helm chart to deploy Valheim dedicated server

StatefulSet with persistent world data, NodePort service for game/query/
crossplay ports, and secret for the server password.

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
2026-09-18 19:34:51 +02:00
co-authored by Copilot
parent 5204de63d0
commit a62faa0d73
7 changed files with 297 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
# valheim-gitops
Helm chart to run a [Valheim](https://www.valheimgame.com/) dedicated server on Kubernetes,
using the community [`lloesche/valheim-server`](https://github.com/lloesche/valheim-server-docker)
image.
## What's included
- **Namespace** (`valheim` by default, toggle with `namespace.create`)
- **StatefulSet** running the game server with a persistent volume for world data
(`/config` and `/opt/valheim`) so the world survives restarts/upgrades
- **Secret** holding the server join password (`SERVER_PASS`)
- **Service** (`NodePort` by default) exposing the game (2456/udp), query (2457/udp)
and crossplay (2458/udp) ports
- Headless **Service** for the StatefulSet
## Configuration
See [`values.yaml`](values.yaml) for all options. Important ones:
| Key | Description | Default |
|---|---|---|
| `server.name` | Server name shown in the browser | `Valtersheim` |
| `server.worldName` | World save name | `Midgard` |
| `server.password` | Join password (override via `-f secret-values.yaml`, never commit real passwords) | `changeme-please-override` |
| `service.type` | `NodePort` or `LoadBalancer` | `NodePort` |
| `persistence.storageClassName` | StorageClass for world data, empty = cluster default | `""` |
| `persistence.size` | Size of the world data volume | `10Gi` |
## Usage
```sh
helm upgrade --install valheim . -n valheim --create-namespace \
--set server.password=<your-password>
```
### Deploying via ArgoCD
This repository is intended to be deployed as an ArgoCD `Application` using this
chart as the Helm source (see `apps-in-apps` repo for the bootstrap Application).
> Never commit real passwords in `values.yaml`. Use `--set`, a separate values file
> excluded from git, or a secrets manager (SealedSecrets/ExternalSecrets) for production.