This commit is contained in:
HDW
2026-05-01 10:36:26 +02:00
parent 3262c4b1d2
commit b9a43f2ac7

View File

@@ -1,19 +1,18 @@
---
# 1. NAMESPACE
# 1. Namespace erstellen
apiVersion: v1
kind: Namespace
metadata:
name: rimworld
---
# 2. SERVICE (MetalLB Integration)
# 2. Service für MetalLB (Netzwerkzugriff)
apiVersion: v1
kind: Service
metadata:
name: rimworld-together-hub
namespace: rimworld
annotations:
# Optional: Falls du eine feste IP aus deinem Pool willst, hier eintragen:
# metallb.universe.tf/loadBalancerIPs: 192.168.x.x
# MetalLB Annotation für IP-Management
metallb.universe.tf/allow-shared-ip: "rimworld-hub"
spec:
type: LoadBalancer
@@ -21,10 +20,10 @@ spec:
app: rimworld-together
ports:
- protocol: TCP
port: 9050
targetPort: 9050
port: 25555 # Externer Port (wie in deinem Docker-Befehl)
targetPort: 25555 # Interner Port im Container
---
# 3. STATEFULSET (Die App-Logik)
# 3. StatefulSet (Die App mit Speicher und Node-Zuweisung)
apiVersion: apps/v1
kind: StatefulSet
metadata:
@@ -41,7 +40,7 @@ spec:
labels:
app: rimworld-together
spec:
# NODE AFFINITY: Damit der Pod auf deinem Gaming-Node landet
# Node Affinity: Zwingt den Pod auf deine Gaming-Hardware
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
@@ -53,10 +52,12 @@ spec:
- Games
containers:
- name: hub
image: ghcr.io/rimworldtogether/rimworld-together:latest
# KORREKTER PFAD: ghcr.io/rimworld-together/rimworld-together
image: ghcr.io/rimworld-together/rimworld-together:latest
imagePullPolicy: Always
tty: true
stdin: true
resources:
# Optimierte Limits für Talos
requests:
cpu: 250m
memory: 512Mi
@@ -64,19 +65,17 @@ spec:
cpu: 1000m
memory: 2Gi
ports:
- containerPort: 9050
- containerPort: 25555
name: hub-port
volumeMounts:
- name: storage
mountPath: /app/Data
# AUTOMATISCHES PVC (Wird von Argo CD verwaltet)
mountPath: /Data # Der Pfad aus dem Docker-Volume-Mapping
# Automatisches Erstellen des Speichers auf Talos
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes: [ "ReadWriteOnce" ]
# Falls du eine spezielle StorageClass hast (z.B. longhorn), hier eintragen:
# storageClassName: "longhorn"
resources:
requests:
storage: 2Gi