fastdl
This commit is contained in:
parent
2651cfd7da
commit
9e8cc80c9a
@ -27,6 +27,21 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: fastdl-maps
|
||||||
|
namespace: surf
|
||||||
|
spec:
|
||||||
|
storageClassName: fast
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 200Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# DEPLOYMENT
|
# DEPLOYMENT
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@ -67,10 +82,16 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: cssds
|
- name: cssds
|
||||||
mountPath: /home/steam/cssds
|
mountPath: /home/steam/cssds
|
||||||
|
- name: fastdl-maps
|
||||||
|
mountPath: /fastdl/maps
|
||||||
|
readOnly: true
|
||||||
volumes:
|
volumes:
|
||||||
- name: cssds
|
- name: cssds
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: cssds-data
|
claimName: cssds-data
|
||||||
|
- name: fastdl-maps
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fastdl-maps
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -102,41 +123,24 @@ spec:
|
|||||||
---
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# MAP DOWNLOADER JOB
|
# MAP DOWNLOADER
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
apiVersion: batch/v1
|
apiVersion: v1
|
||||||
kind: Job
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: mapsdl
|
name: mapsdl
|
||||||
namespace: surf
|
namespace: surf
|
||||||
spec:
|
spec:
|
||||||
# Don't automatically restart on failure
|
restartPolicy: Never
|
||||||
backoffLimit: 2
|
containers:
|
||||||
|
|
||||||
# Clean up completed jobs after 1 hour
|
|
||||||
ttlSecondsAfterFinished: 3600
|
|
||||||
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
restartPolicy: Never
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
# Override default dry-run command to actually download
|
|
||||||
command:
|
command:
|
||||||
- "deno"
|
- "deno"
|
||||||
- "run"
|
- "run"
|
||||||
- "--allow-import"
|
- "-A"
|
||||||
- "--allow-net"
|
|
||||||
- "--allow-read"
|
|
||||||
- "--allow-write"
|
|
||||||
- "--allow-env"
|
|
||||||
- "--allow-sys"
|
|
||||||
- "--allow-run"
|
|
||||||
- "mapsdl.ts"
|
- "mapsdl.ts"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -146,27 +150,113 @@ spec:
|
|||||||
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
|
||||||
|
value: |
|
||||||
|
surf_utopia_njv
|
||||||
|
surf_kitsune
|
||||||
|
surf_lt_omnific
|
||||||
|
surf_pantheon
|
||||||
|
surf_kitsune2
|
||||||
|
surf_kepler
|
||||||
|
surf_anzchamps
|
||||||
|
surf_deathstar
|
||||||
|
surf_ebony
|
||||||
|
surf_fornax
|
||||||
|
surf_garden
|
||||||
|
surf_in_space
|
||||||
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
# Mount the same PVC as cssds for maps
|
- name: fastdl-maps
|
||||||
- name: cssds
|
|
||||||
mountPath: /maps
|
mountPath: /maps
|
||||||
subPath: cstrike/maps
|
|
||||||
|
|
||||||
# Mount credentials from secret
|
|
||||||
- name: credentials
|
- name: credentials
|
||||||
mountPath: /app/credentials
|
mountPath: /app/credentials
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# Use the same PVC as the cssds deployment
|
- name: fastdl-maps
|
||||||
- name: cssds
|
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: cssds-data
|
claimName: fastdl-maps
|
||||||
|
|
||||||
# Mount the Google service account credentials
|
|
||||||
- name: credentials
|
- name: credentials
|
||||||
secret:
|
secret:
|
||||||
secretName: mapsdl-credentials
|
secretName: mapsdl-credentials
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
# FASTDL
|
||||||
|
# -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: fastdl
|
||||||
|
namespace: surf
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: fastdl
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fastdl
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: fastdl
|
||||||
|
image: registry.ntwl.xyz/megastructure-surf-fastdl
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- name: fastdl-maps
|
||||||
|
mountPath: /srv/maps
|
||||||
|
readOnly: true
|
||||||
|
volumes:
|
||||||
|
- name: fastdl-maps
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: fastdl-maps
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: fastdl
|
||||||
|
namespace: surf
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: fastdl
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: fastdl
|
||||||
|
namespace: surf
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
spec:
|
||||||
|
ingressClassName: haproxy
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- fastdl.megastructure.surf
|
||||||
|
secretName: fastdl-megastructure-surf-tls
|
||||||
|
rules:
|
||||||
|
- host: fastdl.megastructure.surf
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: fastdl
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
|
||||||
|
---
|
||||||
Loading…
x
Reference in New Issue
Block a user