feat(multiplayer): deploy allocator role

This commit is contained in:
Josh Creek
2026-09-01 18:48:51 +01:00
parent 95e82cc719
commit 2e1c010fa2
6 changed files with 144 additions and 3 deletions
+61
View File
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: allocator
namespace: cosmic-clash
labels:
app.kubernetes.io/name: allocator
app.kubernetes.io/component: allocator
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: allocator
template:
metadata:
labels:
app.kubernetes.io/name: allocator
app.kubernetes.io/component: allocator
spec:
serviceAccountName: allocator
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: allocator
image: ghcr.io/cosmic-clash/allocator@sha256:0000000000000000000000000000000000000000000000000000000000000000
args:
- --dsn=$(COSMIC_CLASH_POSTGRES_DSN)
- --agones-url=https://agones-allocator.agones-system.svc.cluster.local
- --agones-namespace=cosmic-clash
- --metrics-addr=:9091
ports:
- name: metrics
containerPort: 9091
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1
memory: 512Mi
env:
- name: COSMIC_CLASH_POSTGRES_DSN
valueFrom:
secretKeyRef:
name: cosmic-clash-database
key: dsn
- name: COSMIC_CLASH_WORKLOAD_SECRET
valueFrom:
secretKeyRef:
name: cosmic-clash-workload
key: secret