feat: add regional Agones fleet overlays

This commit is contained in:
Josh Creek
2026-08-31 21:51:37 +01:00
parent 6253b620a9
commit 0551fb0b1f
11 changed files with 137 additions and 7 deletions
@@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: control-plane
namespace: cosmic-clash
labels:
app.kubernetes.io/name: control-plane
spec:
@@ -56,4 +57,3 @@ spec:
secretKeyRef:
name: cosmic-clash-steam
key: publisher-key
+55
View File
@@ -0,0 +1,55 @@
apiVersion: agones.dev/v1
kind: Fleet
metadata:
name: cosmic-clash-game
namespace: cosmic-clash
labels:
app.kubernetes.io/name: game-fleet
spec:
replicas: 2
strategy:
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: game-server
cosmic-clash.io/region: EU
cosmic-clash.io/build: build-1
cosmic-clash.io/protocol: "1"
cosmic-clash.io/transport: enet
spec:
ports:
- name: game
containerPort: 7777
protocol: UDP
health:
disabled: false
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
template:
spec:
serviceAccountName: match-server
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: game-server
image: ghcr.io/cosmic-clash/game-server@sha256:0000000000000000000000000000000000000000000000000000000000000000
args: ["--port=7777"]
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 1
memory: 512Mi
+1 -2
View File
@@ -1,10 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: cosmic-clash
resources:
- namespace.yaml
- service-accounts.yaml
- rbac.yaml
- network-policies.yaml
- control-plane-deployment.yaml
- fleet.yaml
+2 -1
View File
@@ -2,6 +2,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-ingress-egress
namespace: cosmic-clash
spec:
podSelector: {}
policyTypes: [Ingress, Egress]
@@ -10,6 +11,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: control-plane-allowed-flows
namespace: cosmic-clash
spec:
podSelector:
matchLabels:
@@ -64,4 +66,3 @@ spec:
podSelector:
matchLabels:
k8s-app: kube-dns
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- path: region.yaml
+10
View File
@@ -0,0 +1,10 @@
apiVersion: agones.dev/v1
kind: Fleet
metadata:
name: cosmic-clash-game
namespace: cosmic-clash
spec:
template:
metadata:
labels:
cosmic-clash.io/region: EU
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- path: region.yaml
+10
View File
@@ -0,0 +1,10 @@
apiVersion: agones.dev/v1
kind: Fleet
metadata:
name: cosmic-clash-game
namespace: cosmic-clash
spec:
template:
metadata:
labels:
cosmic-clash.io/region: NA