--- # 1. Namespace erstellen apiVersion: v1 kind: Namespace metadata: name: rimworld --- # 2. Service für MetalLB (Netzwerkzugriff) apiVersion: v1 kind: Service metadata: name: rimworld-together-hub namespace: rimworld annotations: # MetalLB Annotation für IP-Management metallb.universe.tf/allow-shared-ip: "rimworld-hub" spec: type: LoadBalancer selector: app: rimworld-together ports: - protocol: TCP port: 25555 # Externer Port (wie in deinem Docker-Befehl) targetPort: 25555 # Interner Port im Container --- # 3. StatefulSet (Die App mit Speicher und Node-Zuweisung) apiVersion: apps/v1 kind: StatefulSet metadata: name: rimworld-together namespace: rimworld spec: serviceName: "rimworld-together-hub" replicas: 1 selector: matchLabels: app: rimworld-together template: metadata: labels: app: rimworld-together spec: # Node Affinity: Zwingt den Pod auf deine Gaming-Hardware affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: workload operator: In values: - Games containers: - name: hub # KORREKTER PFAD: ghcr.io/rimworld-together/rimworld-together image: ghcr.io/rimworld-together/rimworld-together:latest imagePullPolicy: Always tty: true stdin: true resources: requests: cpu: 250m memory: 512Mi limits: cpu: 1000m memory: 2Gi ports: - containerPort: 25555 name: hub-port volumeMounts: - name: storage mountPath: /Data # Der Pfad aus dem Docker-Volume-Mapping # Automatisches Erstellen des Speichers auf Talos volumeClaimTemplates: - metadata: name: storage spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 2Gi