feat(multiplayer): harden control-plane availability

This commit is contained in:
Josh Creek
2026-09-01 19:20:53 +01:00
parent e1abac1271
commit 81346ac149
5 changed files with 62 additions and 1 deletions
@@ -23,6 +23,22 @@ spec:
runAsGroup: 10001
seccompProfile:
type: RuntimeDefault
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: control-plane
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/name: control-plane
containers:
- name: control-plane
image: ghcr.io/cosmic-clash/control-plane@sha256:0000000000000000000000000000000000000000000000000000000000000000
@@ -33,6 +49,19 @@ spec:
ports:
- name: http
containerPort: 8080
readinessProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
+10
View File
@@ -0,0 +1,10 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: control-plane
namespace: cosmic-clash
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: control-plane
+1
View File
@@ -7,6 +7,7 @@ resources:
- network-policies.yaml
- control-plane-deployment.yaml
- control-plane-service.yaml
- control-plane-pdb.yaml
- allocator-deployment.yaml
- allocator-service.yaml
- allocator-pdb.yaml