This commit is contained in:
Nathan Rashleigh 2026-02-09 22:34:36 +11:00
parent 04cff2eeda
commit 972209ed04

View File

@ -99,4 +99,72 @@ spec:
targetPort: 27005
nodePort: 32005
---
# -----------------------------------------------------------------------
# MAP DOWNLOADER JOB
# -----------------------------------------------------------------------
apiVersion: batch/v1
kind: Job
metadata:
name: mapsdl
namespace: surf
spec:
# Don't automatically restart on failure
backoffLimit: 2
# Clean up completed jobs after 1 hour
ttlSecondsAfterFinished: 3600
template:
spec:
restartPolicy: Never
containers:
- name: mapsdl
image: registry.ntwl.xyz/megastructure-surf-mapsdl:latest
imagePullPolicy: Always
# Override default dry-run command to actually download
# command:
# - "deno"
# - "run"
# - "--allow-net"
# - "--allow-read"
# - "--allow-write"
# - "--allow-env"
# - "--allow-sys"
# - "mapsdl.ts"
env:
- name: MAPS_DIR
value: "/maps"
- name: TEMP_DIR
value: "/tmp/mapsdl"
- name: GOOGLE_APPLICATION_CREDENTIALS
value: "/app/credentials/service-account.json"
volumeMounts:
# Mount the same PVC as cssds for maps
- name: cssds
mountPath: /maps
subPath: cstrike/maps
# Mount credentials from secret
- name: credentials
mountPath: /app/credentials
readOnly: true
volumes:
# Use the same PVC as the cssds deployment
- name: cssds
persistentVolumeClaim:
claimName: cssds-data
# Mount the Google service account credentials
- name: credentials
secret:
secretName: mapsdl-credentials
---