fix: config.yml volume mount, correct UUID (8f81 segment), remove envFrom
This commit is contained in:
@@ -9,6 +9,7 @@ metadata:
|
|||||||
app.kubernetes.io/part-of: pelican
|
app.kubernetes.io/part-of: pelican
|
||||||
game: valheim
|
game: valheim
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
selector:
|
selector:
|
||||||
@@ -22,44 +23,21 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/arch: amd64
|
kubernetes.io/arch: amd64
|
||||||
containers:
|
volumes:
|
||||||
- name: wings
|
- name: wings-config
|
||||||
image: ghcr.io/pelican-dev/wings:latest
|
secret:
|
||||||
env:
|
secretName: wings-valheim-config
|
||||||
- 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: "9d09e83d-00c3-4404-07c0522a6c25"
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: wings-valheim-config
|
|
||||||
volumeMounts:
|
|
||||||
- name: docker-socket
|
- name: docker-socket
|
||||||
mountPath: /var/run/docker.sock
|
emptyDir: {}
|
||||||
- name: wings-data
|
- name: dind-storage
|
||||||
mountPath: /var/lib/wings
|
emptyDir: {}
|
||||||
- name: server-data
|
- name: server-data
|
||||||
mountPath: /mnt/server
|
persistentVolumeClaim:
|
||||||
readinessProbe:
|
claimName: wings-valheim-data
|
||||||
httpGet:
|
- name: autostart-token
|
||||||
path: /ready
|
secret:
|
||||||
port: 8081
|
secretName: pelican-autostart-key
|
||||||
initialDelaySeconds: 10
|
containers:
|
||||||
periodSeconds: 10
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /health
|
|
||||||
port: 8081
|
|
||||||
initialDelaySeconds: 15
|
|
||||||
periodSeconds: 30
|
|
||||||
- name: dind
|
- name: dind
|
||||||
image: docker:24-dind
|
image: docker:24-dind
|
||||||
securityContext:
|
securityContext:
|
||||||
@@ -72,47 +50,62 @@ spec:
|
|||||||
mountPath: /var/run
|
mountPath: /var/run
|
||||||
- name: dind-storage
|
- name: dind-storage
|
||||||
mountPath: /var/lib/docker
|
mountPath: /var/lib/docker
|
||||||
readinessProbe:
|
resources:
|
||||||
exec:
|
requests:
|
||||||
command:
|
cpu: "500m"
|
||||||
- sh
|
memory: "512Mi"
|
||||||
- -c
|
limits:
|
||||||
- '[ -S /var/run/docker.sock ]'
|
cpu: "1"
|
||||||
initialDelaySeconds: 5
|
memory: "1Gi"
|
||||||
periodSeconds: 5
|
- name: wings
|
||||||
- name: game-autostart
|
image: ghcr.io/pelican-dev/wings:latest
|
||||||
image: curlimages/curl:latest
|
|
||||||
env:
|
|
||||||
- name: PELICAN_API_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: pelican-autostart-key
|
|
||||||
key: api_key
|
|
||||||
- name: SERVER_UUID
|
|
||||||
value: "9d09e83d-00c3-4404-07c0522a6c25"
|
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
echo "Waiting for Wings API to be ready..."
|
export DOCKER_HOST=tcp://localhost:2375
|
||||||
while ! curl -sf http://localhost:8081/ready; do
|
exec wings
|
||||||
sleep 2
|
env:
|
||||||
done
|
- name: DOCKER_HOST
|
||||||
echo "Wings ready. Starting game server..."
|
value: tcp://localhost:2375
|
||||||
while true; do
|
- name: WATCHDOG_ENABLED
|
||||||
sleep 60
|
value: "true"
|
||||||
echo "Checking game server status..."
|
|
||||||
done
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
- name: wings-config
|
||||||
|
mountPath: /etc/pterodactyl
|
||||||
|
readOnly: true
|
||||||
|
- name: docker-socket
|
||||||
|
mountPath: /var/run/docker.sock
|
||||||
- name: server-data
|
- name: server-data
|
||||||
mountPath: /mnt/server
|
mountPath: /mnt/server
|
||||||
volumes:
|
resources:
|
||||||
- name: docker-socket
|
requests:
|
||||||
emptyDir: {}
|
cpu: "1"
|
||||||
- name: dind-storage
|
memory: "2Gi"
|
||||||
emptyDir: {}
|
limits:
|
||||||
- name: wings-data
|
cpu: "4"
|
||||||
emptyDir: {}
|
memory: "8Gi"
|
||||||
- name: server-data
|
- name: game-autostart
|
||||||
persistentVolumeClaim:
|
image: curlimages/curl:latest
|
||||||
claimName: wings-valheim-data
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
while true; do
|
||||||
|
sleep 60
|
||||||
|
curl -sf -X POST "https://pelican.khalisio.com/api/client/servers/9d09e83d-00c3-4404-8f81-07c0522a6c25/power" \
|
||||||
|
-H "Authorization: Bearer $(cat /etc/secrets/autostart/api_key)" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"signal":"start"}' > /dev/null 2>&1 || true
|
||||||
|
done
|
||||||
|
volumeMounts:
|
||||||
|
- name: autostart-token
|
||||||
|
mountPath: /etc/secrets/autostart
|
||||||
|
readOnly: true
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "50m"
|
||||||
|
memory: "64Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "100m"
|
||||||
|
memory: "128Mi"
|
||||||
|
|||||||
Reference in New Issue
Block a user