This commit is contained in:
Nathan Rashleigh 2026-02-10 11:36:10 +11:00
parent 9e8cc80c9a
commit 15cd89da06

View File

@ -42,6 +42,18 @@ spec:
--- ---
apiVersion: v1
kind: ConfigMap
metadata:
name: cfg
namespace: surf
data:
mapcycle.txt: |
surf_fornax
surf_boreas
---
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
# DEPLOYMENT # DEPLOYMENT
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
@ -49,17 +61,17 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: megastructure-surf name: cssds
namespace: surf namespace: surf
spec: spec:
replicas: 1 replicas: 1
selector: selector:
matchLabels: matchLabels:
app: megastructure-surf app: cssds
template: template:
metadata: metadata:
labels: labels:
app: megastructure-surf app: cssds
spec: spec:
initContainers: initContainers:
- name: fix-permissions - name: fix-permissions
@ -69,10 +81,10 @@ spec:
- name: cssds - name: cssds
mountPath: /home/steam/cssds mountPath: /home/steam/cssds
containers: containers:
- name: megastructure-surf - name: cssds
image: registry.ntwl.xyz/megastructure-surf image: registry.ntwl.xyz/megastructure-surf-cssds
imagePullPolicy: Always imagePullPolicy: Always
command: ["sleep", "100000000"] # command: ["sleep", "100000000"]
ports: ports:
- containerPort: 27015 - containerPort: 27015
- containerPort: 27005 - containerPort: 27005
@ -85,6 +97,9 @@ spec:
- name: fastdl-maps - name: fastdl-maps
mountPath: /fastdl/maps mountPath: /fastdl/maps
readOnly: true readOnly: true
- name: cfg
mountPath: /home/steam/cfg
readOnly: true
volumes: volumes:
- name: cssds - name: cssds
persistentVolumeClaim: persistentVolumeClaim:
@ -92,6 +107,9 @@ spec:
- name: fastdl-maps - name: fastdl-maps
persistentVolumeClaim: persistentVolumeClaim:
claimName: fastdl-maps claimName: fastdl-maps
- name: cfg
configMap:
name: cfg
--- ---
@ -102,12 +120,12 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: megastructure-surf name: cssds
namespace: surf namespace: surf
spec: spec:
type: NodePort type: NodePort
selector: selector:
app: megastructure-surf app: cssds
ports: ports:
- name: game-port - name: game-port
protocol: UDP protocol: UDP
@ -134,51 +152,49 @@ metadata:
spec: spec:
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: mapsdl - name: mapsdl
image: registry.ntwl.xyz/megastructure-surf-mapsdl:latest image: registry.ntwl.xyz/megastructure-surf-mapsdl:latest
imagePullPolicy: Always imagePullPolicy: Always
command: command:
- "deno" - "deno"
- "run" - "run"
- "-A" - "-A"
- "mapsdl.ts" - "mapsdl.ts"
env:
env: - name: MAPS_DIR
- name: MAPS_DIR value: "/maps"
value: "/maps" - name: TEMP_DIR
- name: TEMP_DIR value: "/tmp/mapsdl"
value: "/tmp/mapsdl" - name: GOOGLE_APPLICATION_CREDENTIALS
- name: GOOGLE_APPLICATION_CREDENTIALS value: "/app/credentials/service-account.json"
value: "/app/credentials/service-account.json" - name: MAPS_WISHLIST
- name: MAPS_WISHLIST value: |
value: | surf_anzchamps
surf_utopia_njv surf_boreas
surf_kitsune surf_deathstar
surf_lt_omnific surf_ebony
surf_pantheon surf_fornax
surf_kitsune2 surf_garden
surf_kepler surf_in_space
surf_anzchamps surf_kepler
surf_deathstar surf_kitsune
surf_ebony surf_kitsune2
surf_fornax surf_lt_omnific
surf_garden surf_pantheon
surf_in_space surf_utopia_njv
volumeMounts:
volumeMounts:
- name: fastdl-maps
mountPath: /maps
- name: credentials
mountPath: /app/credentials
readOnly: true
volumes:
- name: fastdl-maps - name: fastdl-maps
persistentVolumeClaim: mountPath: /maps
claimName: fastdl-maps
- name: credentials - name: credentials
secret: mountPath: /app/credentials
secretName: mapsdl-credentials readOnly: true
volumes:
- name: fastdl-maps
persistentVolumeClaim:
claimName: fastdl-maps
- name: credentials
secret:
secretName: mapsdl-credentials
--- ---