From 38bc57efa929a752e92541b64275c7611d823cc8 Mon Sep 17 00:00:00 2001 From: gitea-admin Date: Tue, 19 May 2026 00:15:04 +0000 Subject: [PATCH] feat: deploy Wings instance for Return to Moria --- .../game-servers/wings-moria/deployment.yaml | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 deployments/game-servers/wings-moria/deployment.yaml diff --git a/deployments/game-servers/wings-moria/deployment.yaml b/deployments/game-servers/wings-moria/deployment.yaml new file mode 100644 index 0000000..ff8f854 --- /dev/null +++ b/deployments/game-servers/wings-moria/deployment.yaml @@ -0,0 +1,118 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wings-moria + namespace: game-servers + labels: + app.kubernetes.io/name: wings + app.kubernetes.io/component: game-server + app.kubernetes.io/part-of: pelican + game: moria +spec: + strategy: + type: Recreate + selector: + matchLabels: + app: wings-moria + template: + metadata: + labels: + app: wings-moria + game: moria + spec: + nodeSelector: + kubernetes.io/arch: amd64 + containers: + - name: wings + image: ghcr.io/pelican-dev/wings:latest + env: + - name: DOCKER_HOST + value: tcp://localhost:2375 + - name: WINGS_UID + value: "1000" + - name: WINGS_GID + value: "1000" + - name: WINGS_PORT + value: "8081" + - name: WINGS_API_SFTP_PORT + value: "2023" + - name: WINGS_SERVER_UUID + value: "8890d0d7-d409-4d87-99dd-f16e2adf3502" + envFrom: + - secretRef: + name: wings-moria-config + volumeMounts: + - name: docker-socket + mountPath: /var/run/docker.sock + - name: wings-data + mountPath: /var/lib/wings + - name: server-data + mountPath: /mnt/server + readinessProbe: + httpGet: + path: /ready + port: 8081 + initialDelaySeconds: 10 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /health + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 30 + - name: dind + image: docker:24-dind + securityContext: + privileged: true + env: + - name: DOCKER_TLS_CERTDIR + value: "" + volumeMounts: + - name: docker-socket + mountPath: /var/run + - name: dind-storage + mountPath: /var/lib/docker + readinessProbe: + exec: + command: + - sh + - -c + - '[ -S /var/run/docker.sock ]' + initialDelaySeconds: 5 + periodSeconds: 5 + - name: game-autostart + image: curlimages/curl:latest + env: + - name: PELICAN_API_KEY + valueFrom: + secretKeyRef: + name: pelican-autostart-key + key: api_key + - name: SERVER_UUID + value: "8890d0d7-d409-4d87-99dd-f16e2adf3502" + command: + - /bin/sh + - -c + - | + echo "Waiting for Wings API to be ready..." + while ! curl -sf http://localhost:8081/ready; do + sleep 2 + done + echo "Wings ready. Starting game server..." + while true; do + sleep 60 + echo "Checking game server status..." + done + volumeMounts: + - name: server-data + mountPath: /mnt/server + volumes: + - name: docker-socket + emptyDir: {} + - name: dind-storage + emptyDir: {} + - name: wings-data + emptyDir: {} + - name: server-data + persistentVolumeClaim: + claimName: wings-moria-data