mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 00:14:00 +00:00
feat: add regional Agones fleet overlays
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,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,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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user