# services/game-stream/wolf-statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: name: wolf namespace: game-stream labels: app: wolf spec: serviceName: wolf replicas: 1 selector: matchLabels: app: wolf template: metadata: labels: app: wolf atlas.bstein.dev/game-mode: wolf spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet runtimeClassName: nvidia securityContext: fsGroup: 1000 initContainers: - name: wolfmanager-data-permissions image: busybox:1.36 command: ["sh", "-c", "mkdir -p /app/config && chown -R 1000:1000 /app/config"] volumeMounts: - name: wolfmanager-data mountPath: /app/config nodeSelector: kubernetes.io/hostname: titan-24 tolerations: - key: nvidia.com/gpu operator: Exists effect: NoSchedule containers: - name: wolf image: ghcr.io/games-on-whales/wolf:stable imagePullPolicy: IfNotPresent env: - name: WOLF_LOG_LEVEL value: INFO - name: WOLF_DOCKER_SOCKET value: /var/run/docker.sock - name: WOLF_SOCKET_PATH value: /var/run/wolf/wolf.sock - name: NVIDIA_DRIVER_CAPABILITIES value: all - name: NVIDIA_VISIBLE_DEVICES value: all securityContext: privileged: true resources: requests: cpu: "2" memory: 4Gi nvidia.com/gpu.shared: 1 limits: cpu: "12" memory: 32Gi nvidia.com/gpu.shared: 1 volumeMounts: - name: wolf-state mountPath: /etc/wolf - name: wolf-runtime mountPath: /run/user/wolf - name: wolf-runtime mountPath: /var/run/wolf - name: docker-socket mountPath: /var/run/docker.sock - name: dev mountPath: /dev - name: udev mountPath: /run/udev - name: wolf-api-proxy image: ghcr.io/games-on-whales/wolf:stable imagePullPolicy: IfNotPresent command: ["/usr/bin/python3", "/opt/wolf-api-proxy/wolf_api_proxy.py"] ports: - name: api-proxy containerPort: 8088 env: - name: WOLF_SOCKET_PATH value: /var/run/wolf/wolf.sock resources: requests: cpu: 25m memory: 64Mi limits: cpu: 250m memory: 256Mi volumeMounts: - name: wolf-runtime mountPath: /var/run/wolf - name: wolf-api-proxy mountPath: /opt/wolf-api-proxy readOnly: true - name: wolfmanager image: ghcr.io/games-on-whales/wolfmanager/wolfmanager:latest imagePullPolicy: IfNotPresent env: - name: NODE_ENV value: production - name: NEXTAUTH_URL value: https://wolf.bstein.dev - name: WOLF_SOCKET_PATH value: /var/run/wolf/wolf.sock - name: WOLF_DOCKER_SOCKET value: /var/run/docker.sock - name: HOSTNAME value: 0.0.0.0 - name: PORT value: "3000" - name: SCHEDULED_TASK_ENABLED value: "true" ports: - name: wolfmanager containerPort: 3000 readinessProbe: tcpSocket: port: 3000 initialDelaySeconds: 10 periodSeconds: 10 livenessProbe: tcpSocket: port: 3000 initialDelaySeconds: 30 periodSeconds: 20 resources: requests: cpu: 100m memory: 256Mi limits: cpu: "1" memory: 1Gi volumeMounts: - name: wolf-runtime mountPath: /var/run/wolf - name: docker-socket mountPath: /var/run/docker.sock - name: wolfmanager-data mountPath: /app/config volumes: - name: wolf-state hostPath: path: /etc/wolf type: DirectoryOrCreate - name: wolf-runtime emptyDir: {} - name: wolf-api-proxy configMap: name: wolf-api-proxy defaultMode: 0555 - name: wolfmanager-data hostPath: path: /etc/wolfmanager type: DirectoryOrCreate - name: docker-socket hostPath: path: /var/run/docker.sock type: Socket - name: dev hostPath: path: /dev type: Directory - name: udev hostPath: path: /run/udev type: Directory