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
+49
View File
@@ -0,0 +1,49 @@
apiVersion: v1
kind: Service
metadata:
name: valheim-headless
namespace: {{ .Values.namespace.name }}
labels:
app.kubernetes.io/name: valheim
spec:
clusterIP: None
selector:
app.kubernetes.io/name: valheim
ports:
- name: game
port: {{ .Values.service.gamePort }}
protocol: UDP
---
apiVersion: v1
kind: Service
metadata:
name: valheim
namespace: {{ .Values.namespace.name }}
labels:
app.kubernetes.io/name: valheim
spec:
type: {{ .Values.service.type }}
selector:
app.kubernetes.io/name: valheim
ports:
- name: game
port: {{ .Values.service.gamePort }}
targetPort: {{ .Values.service.gamePort }}
protocol: UDP
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePorts.game }}
nodePort: {{ .Values.service.nodePorts.game }}
{{- end }}
- name: query
port: {{ .Values.service.queryPort }}
targetPort: {{ .Values.service.queryPort }}
protocol: UDP
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePorts.query }}
nodePort: {{ .Values.service.nodePorts.query }}
{{- end }}
- name: crossplay
port: {{ .Values.service.crossplayPort }}
targetPort: {{ .Values.service.crossplayPort }}
protocol: UDP
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePorts.crossplay }}
nodePort: {{ .Values.service.nodePorts.crossplay }}
{{- end }}