diff --git a/services/game-stream/wolf-statefulset.yaml b/services/game-stream/wolf-statefulset.yaml index 58088579..4347bf87 100644 --- a/services/game-stream/wolf-statefulset.yaml +++ b/services/game-stream/wolf-statefulset.yaml @@ -26,10 +26,10 @@ spec: initContainers: - name: wolfmanager-data-permissions image: busybox:1.36 - command: ["sh", "-c", "mkdir -p /app/data && chown -R 1000:1000 /app/data"] + command: ["sh", "-c", "mkdir -p /app/config && chown -R 1000:1000 /app/config"] volumeMounts: - name: wolfmanager-data - mountPath: /app/data + mountPath: /app/config nodeSelector: kubernetes.io/hostname: titan-24 tolerations: @@ -45,6 +45,8 @@ spec: 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 @@ -65,6 +67,8 @@ spec: 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 @@ -78,6 +82,9 @@ spec: ports: - name: api-proxy containerPort: 8088 + env: + - name: WOLF_SOCKET_PATH + value: /var/run/wolf/wolf.sock resources: requests: cpu: 25m @@ -87,61 +94,39 @@ spec: memory: 256Mi volumeMounts: - name: wolf-runtime - mountPath: /run/user/wolf + mountPath: /var/run/wolf - name: wolf-api-proxy mountPath: /opt/wolf-api-proxy readOnly: true - name: wolfmanager - image: ghcr.io/salty2011/wolfmanager:latest + image: ghcr.io/games-on-whales/wolfmanager/wolfmanager:latest imagePullPolicy: IfNotPresent - command: ["/bin/sh", "-ec"] - args: - - | - umask 077 - mkdir -p /app/data - if [ ! -s /app/data/jwt_secret ]; then - head -c 32 /dev/urandom | od -An -tx1 | tr -d ' \n' > /app/data/jwt_secret - fi - if [ ! -s /app/data/admin_password ]; then - printf 'Wm%s1a\n' "$(head -c 18 /dev/urandom | od -An -tx1 | tr -d ' \n')" > /app/data/admin_password - fi - export Jwt__SecretKey="$(cat /app/data/jwt_secret)" - export Admin__Password="$(cat /app/data/admin_password)" - exec dotnet WolfManager.Api.dll env: - - name: ASPNETCORE_URLS - value: http://+:8080 - - name: ASPNETCORE_ENVIRONMENT - value: Production - - name: ConnectionStrings__DefaultConnection - value: Data Source=/app/data/wolfmanager.db - - name: Jobs__Storage - value: Memory - - name: Jobs__DashboardEnabled + - 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" - - name: Wolf__UseUnixSocket - value: "true" - - name: Wolf__UnixSocketPath - value: /run/user/wolf/wolf.sock - - name: OpenTelemetry__ServiceName - value: WolfManager - - name: OpenTelemetry__ConsoleExporter - value: "false" - - name: OpenTelemetry__OtlpExporter - value: "false" ports: - name: wolfmanager - containerPort: 8080 + containerPort: 3000 readinessProbe: - httpGet: - path: /health/ready - port: 8080 + tcpSocket: + port: 3000 initialDelaySeconds: 10 periodSeconds: 10 livenessProbe: - httpGet: - path: /health/live - port: 8080 + tcpSocket: + port: 3000 initialDelaySeconds: 30 periodSeconds: 20 resources: @@ -153,9 +138,11 @@ spec: memory: 1Gi volumeMounts: - name: wolf-runtime - mountPath: /run/user/wolf + mountPath: /var/run/wolf + - name: docker-socket + mountPath: /var/run/docker.sock - name: wolfmanager-data - mountPath: /app/data + mountPath: /app/config volumes: - name: wolf-state hostPath: diff --git a/services/game-stream/wolfmanager-service.yaml b/services/game-stream/wolfmanager-service.yaml index 43b45bfe..26a36f35 100644 --- a/services/game-stream/wolfmanager-service.yaml +++ b/services/game-stream/wolfmanager-service.yaml @@ -13,5 +13,5 @@ spec: ports: - name: http port: 8080 - targetPort: 8080 + targetPort: 3000 protocol: TCP