mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
fix(multiplayer): deploy reconnect abandonment maintenance
This commit is contained in:
@@ -11,6 +11,7 @@ resources:
|
||||
- allocator-deployment.yaml
|
||||
- allocator-service.yaml
|
||||
- allocator-pdb.yaml
|
||||
- maintenance-deployment.yaml
|
||||
- fleet.yaml
|
||||
- fleet-autoscaler.yaml
|
||||
- game-server-pdb.yaml
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: maintenance
|
||||
namespace: cosmic-clash
|
||||
labels:
|
||||
app.kubernetes.io/name: maintenance
|
||||
app.kubernetes.io/component: maintenance
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: maintenance
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: maintenance
|
||||
app.kubernetes.io/component: maintenance
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
serviceAccountName: maintenance
|
||||
automountServiceAccountToken: false
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10001
|
||||
runAsGroup: 10001
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: maintenance
|
||||
image: ghcr.io/cosmic-clash/maintenance@sha256:0000000000000000000000000000000000000000000000000000000000000000
|
||||
args:
|
||||
- --dsn=$(COSMIC_CLASH_POSTGRES_DSN)
|
||||
- --interval=1m
|
||||
- --initial-connect-interval=1s
|
||||
- --batch=100
|
||||
- --stalled-allocation-batch=100
|
||||
- --initial-connect-batch=100
|
||||
- --live-abandonment-batch=100
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop: [ALL]
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
env:
|
||||
- name: COSMIC_CLASH_POSTGRES_DSN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: cosmic-clash-database
|
||||
key: dsn
|
||||
@@ -141,3 +141,37 @@ spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: maintenance-allowed-egress
|
||||
namespace: cosmic-clash
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: maintenance
|
||||
policyTypes: [Egress]
|
||||
egress:
|
||||
- to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: data
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: postgres
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5432
|
||||
- ports:
|
||||
- protocol: UDP
|
||||
port: 53
|
||||
- protocol: TCP
|
||||
port: 53
|
||||
to:
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
podSelector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
|
||||
@@ -18,3 +18,10 @@ metadata:
|
||||
name: allocator
|
||||
namespace: cosmic-clash
|
||||
automountServiceAccountToken: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: maintenance
|
||||
namespace: cosmic-clash
|
||||
automountServiceAccountToken: false
|
||||
|
||||
Reference in New Issue
Block a user