feat: deploy all 8 Wings instances (ARK SA, 7D2D, Enshrouded, Moria, Palworld, Satisfactory, SOTF, Valheim) #95

Closed
gitea-admin wants to merge 48 commits from orion/auto/feat-deploy-all-8-wings-instances-ark-sa-1779150161684 into main
Showing only changes of commit e21bda8329 - Show all commits
@@ -7,7 +7,6 @@ metadata:
app: wings-ark-sa app: wings-ark-sa
game: ark-sa game: ark-sa
spec: spec:
replicas: 1
strategy: strategy:
type: Recreate type: Recreate
selector: selector:
@@ -21,101 +20,67 @@ spec:
spec: spec:
nodeSelector: nodeSelector:
kubernetes.io/arch: amd64 kubernetes.io/arch: amd64
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: game
operator: In
values: [ark-sa]
topologyKey: "kubernetes.io/hostname"
volumes:
- name: wings-config
secret:
secretName: wings-ark-sa-config
- name: game-data
persistentVolumeClaim:
claimName: wings-ark-sa-data
- name: docker-socket
emptyDir: {}
- name: autostart-token
secret:
secretName: pelican-autostart-key
containers: containers:
- name: dind
image: docker:dind
args:
- "--storage-driver=vfs"
- "--iptables=false"
securityContext:
privileged: true
volumeMounts:
- name: docker-socket
mountPath: /var/run/docker.sock
env:
- name: DOCKER_TLS_CERTDIR
value: ""
resources:
requests:
cpu: "500m"
memory: "512Mi"
limits:
cpu: "1"
memory: "1Gi"
- name: wings - name: wings
image: ghcr.io/pelican-dev/wings:latest image: ghcr.io/pelican-dev/wings:latest
command:
- /bin/sh
- -c
- |
export DOCKER_HOST=tcp://localhost:2375
exec wings
envFrom:
- secretRef:
name: wings-ark-sa-config
env: env:
- name: DOCKER_HOST - name: DOCKER_HOST
value: tcp://localhost:2375 value: tcp://localhost:2375
- name: WATCHDOG_ENABLED - name: WINGS_UID
value: "true" value: "1000"
- name: WINGS_GID
value: "1000"
- name: WINGS_PORT
value: "8081"
- name: WINGS_API_SFTP_PORT
value: "2023"
- name: WINGS_SERVER_UUID
value: "3fd0b08d-7393-4d0f-b11c-bad5e1d1f771"
envFrom:
- secretRef:
name: wings-ark-sa-config
volumeMounts:
- name: server-data
mountPath: /home/container
- name: dind
image: docker:24-dind
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: ""
volumeMounts: volumeMounts:
- name: wings-config
mountPath: /etc/pterodactyl
readOnly: true
- name: game-data
mountPath: /mnt/server
- name: docker-socket - name: docker-socket
mountPath: /var/run/docker.sock mountPath: /var/run
resources:
requests:
cpu: "2"
memory: "4Gi"
limits:
cpu: "4"
memory: "8Gi"
- name: game-autostart - name: game-autostart
image: curlimages/curl:latest image: curlimages/curl:latest
env:
- name: PELICAN_API_KEY
valueFrom:
secretKeyRef:
name: pelican-autostart-key
key: api_key
- name: SERVER_UUID
value: "3fd0b08d-7393-4d0f-b11c-bad5e1d1f771"
command: command:
- /bin/sh - /bin/sh
- -c - -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 while true; do
sleep 60 sleep 60
curl -sf -X POST "https://pelican.khalisio.com/api/client/servers/3fd0b08d-7393-4d0f-b11c-bad5e1d1f771/power" \
-H "Authorization: Bearer $(cat /etc/secrets/autostart/api_key)" \
-H "Content-Type: application/json" \
-d '{"signal":"start"}' > /dev/null 2>&1 || true
done done
volumeMounts:
- name: autostart-token
mountPath: /etc/secrets/autostart
readOnly: true
resources: resources:
requests: requests:
cpu: "50m" cpu: 100m
memory: "64Mi" memory: 256Mi
limits: volumes:
cpu: "100m" - name: docker-socket
memory: "128Mi" emptyDir: {}
restartPolicy: Always - name: server-data
persistentVolumeClaim:
claimName: wings-ark-sa-data