feat: deploy Wings instance for 7 Days to Die

This commit is contained in:
2026-05-19 00:15:22 +00:00
parent 49b14b6d3f
commit ef90860e82
@@ -0,0 +1,115 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wings-7d2d
namespace: game-servers
labels:
app: wings-7d2d
game: 7d2d
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: wings-7d2d
template:
metadata:
labels:
app: wings-7d2d
game: 7d2d
spec:
nodeSelector:
kubernetes.io/arch: amd64
containers:
- name: dind
image: docker:24-dind
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: ""
resources:
requests:
cpu: "500m"
memory: "1Gi"
limits:
cpu: "1"
memory: "2Gi"
- name: wings
image: ghcr.io/pelican-dev/wings:latest
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: WINGS_Umask
value: "0002"
- name: GRPC_PORT
value: "50051"
- name: WINGS_API_LISTEN
value: "0.0.0.0:8081"
- name: WINGS_SFTP_LISTEN
value: "0.0.0.0:2023"
- name: WINGS_SERVER_UUID
valueFrom:
secretKeyRef:
name: wings-7d2d-config
key: server_uuid
- name: WINGS_API_KEY
valueFrom:
secretKeyRef:
name: wings-7d2d-config
key: api_key
envFrom:
- secretRef:
name: wings-7d2d-config
ports:
- containerPort: 8081
- containerPort: 2023
resources:
requests:
cpu: "2"
memory: "8Gi"
limits:
cpu: "4"
memory: "16Gi"
volumeMounts:
- name: data
mountPath: /home/container
- name: game-autostart
image: curlimages/curl:latest
command: ["/bin/sh", "-c"]
args:
- |
while true; do
WINGS_READY=false
while [ "$WINGS_READY" = "false" ]; do
if curl -sf http://localhost:8081/health > /dev/null 2>&1; then
WINGS_READY=true
echo "Wings is ready, sending start signal..."
sleep 30
curl -sf -X POST \
-H "Authorization: Bearer $PELICAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"signal":"start"}' \
https://pelican.khalisio.com/api/client/servers/3a8d9bca-1274-4917-b341-67cd5168e2df/power || echo "Start signal failed, retrying..."
break
fi
echo "Waiting for Wings to be ready..."
sleep 5
done
sleep 60
done
envFrom:
- secretRef:
name: pelican-autostart-key
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"
volumes:
- name: data
persistentVolumeClaim:
claimName: wings-7d2d-data