1cf47477d3
- Purpur 1.21.4 server via itzg/docker-minecraft-server (java21) - StatefulSet with 3 PVCs: worlds (20Gi), plugins (5Gi), logs (5Gi) - Aikar G1GC JVM flags, 6GB heap (sized for Legion's 15GB RAM) - Postgres: mudcraft database + user in existing platform/postgres - RCON secret + DB password via ExternalSecret → Vault - Traefik TCP entrypoint on port 25565 for mudcraft.nook.family - mudcraft namespace via Terraform - Argo CD app watching k8s/mudcraft/
90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: mudcraft
|
|
namespace: mudcraft
|
|
labels:
|
|
app: mudcraft
|
|
spec:
|
|
replicas: 1
|
|
serviceName: mudcraft
|
|
selector:
|
|
matchLabels:
|
|
app: mudcraft
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mudcraft
|
|
spec:
|
|
terminationGracePeriodSeconds: 120
|
|
containers:
|
|
- name: mudcraft
|
|
image: itzg/minecraft-server:java21
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: minecraft
|
|
containerPort: 25565
|
|
protocol: TCP
|
|
- name: rcon
|
|
containerPort: 25575
|
|
protocol: TCP
|
|
envFrom:
|
|
- configMapRef:
|
|
name: mudcraft-config
|
|
env:
|
|
- name: RCON_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mudcraft-secrets
|
|
key: rcon-password
|
|
- name: DB_URL
|
|
value: "jdbc:postgresql://postgres-postgresql.platform.svc.cluster.local:5432/mudcraft"
|
|
- name: DB_USER
|
|
value: "mudcraft"
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: mudcraft-secrets
|
|
key: db-password
|
|
volumeMounts:
|
|
- name: worlds
|
|
mountPath: /data/worlds
|
|
- name: plugins
|
|
mountPath: /data/plugins
|
|
- name: logs
|
|
mountPath: /data/logs
|
|
resources:
|
|
requests:
|
|
memory: 7Gi
|
|
cpu: 2000m
|
|
limits:
|
|
memory: 8Gi
|
|
cpu: 6000m
|
|
lifecycle:
|
|
preStop:
|
|
exec:
|
|
command: ["/bin/sh", "-c", "rcon-cli stop && sleep 15"]
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 25565
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 15
|
|
failureThreshold: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 25565
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 30
|
|
failureThreshold: 5
|
|
volumes:
|
|
- name: worlds
|
|
persistentVolumeClaim:
|
|
claimName: mudcraft-worlds
|
|
- name: plugins
|
|
persistentVolumeClaim:
|
|
claimName: mudcraft-plugins
|
|
- name: logs
|
|
persistentVolumeClaim:
|
|
claimName: mudcraft-logs
|