diff --git a/deployments/game-servers/wings-palworld/deployment.yaml b/deployments/game-servers/wings-palworld/deployment.yaml new file mode 100644 index 0000000..e65d871 --- /dev/null +++ b/deployments/game-servers/wings-palworld/deployment.yaml @@ -0,0 +1,82 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wings-palworld + namespace: game-servers + labels: + app: wings-palworld + game: palworld +spec: + strategy: + type: Recreate + selector: + matchLabels: + app: wings-palworld + template: + metadata: + labels: + app: wings-palworld + game: palworld + 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: "3b3098ce-97be-4de4-801e-5a9605d9d805" + envFrom: + - secretRef: + name: wings-palworld-config + volumeMounts: + - name: server-data + mountPath: /home/container + - name: dind + image: docker:24-dind + securityContext: + privileged: true + env: + - name: DOCKER_TLS_CERTDIR + value: "" + volumeMounts: + - name: docker-socket + mountPath: /var/run + - 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: "3b3098ce-97be-4de4-801e-5a9605d9d805" + 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 + done + volumes: + - name: docker-socket + emptyDir: {} + - name: server-data + persistentVolumeClaim: + claimName: wings-palworld-data