fukuops/k8s/charts/valheim-server/templates/service.yaml
cătălin 4b60b6b8ad
Some checks failed
checks / pre-commit (push) Failing after 30s
checks / k8s (push) Failing after 31s
checks / tflint (push) Failing after 31s
OpenTofu deployments / adguard (push) Failing after 30s
OpenTofu deployments / authentik (push) Failing after 30s
feat: add valheim chart and argo app
2025-04-01 19:24:08 +02:00

34 lines
1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ include "valheim-server.fullname" . }}
labels:
{{- include "valheim-server.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
{{- end }}
ports:
- port: {{ .Values.server.port }}
targetPort: game
protocol: UDP
name: game
- port: {{ add .Values.server.port 1 }}
targetPort: game-1
protocol: UDP
name: game-1
- port: {{ add .Values.server.port 2 }}
targetPort: game-2
protocol: UDP
name: game-2
selector:
{{- include "valheim-server.selectorLabels" . | nindent 4 }}