StatefulSet with persistent world data, NodePort service for game/query/ crossplay ports, and secret for the server password. Co-authored-by: Copilot <[email protected]>
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
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 }}
|