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:
@@ -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 }}
|
||||
Reference in New Issue
Block a user