--- 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 initContainers: # Copies plugin JARs from the mudcraft/plugins image into the plugins PVC. # To add/update plugins: update the Dockerfile in mudcraft/mudcraft repo, # push to main — CI rebuilds the image and the next pod restart picks it up. - name: install-plugins image: registry.neuralplatform.ai/mudcraft/plugins:e41f6256805c28b3bb8e8832293afa3eab701082 imagePullPolicy: Always command: ["sh", "-c", "cp -r /plugins/* /target/ && echo 'Plugins installed'"] volumeMounts: - name: plugins mountPath: /target containers: - name: mudcraft image: itzg/minecraft-server:java21 imagePullPolicy: Always ports: - name: minecraft containerPort: 25565 protocol: TCP - name: rcon containerPort: 25575 protocol: TCP - name: voicechat containerPort: 24454 protocol: UDP 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 - name: LP_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 - name: purpurextras-config mountPath: /data/plugins/PurpurExtras/config.yml subPath: config.yml - name: luckperms-config mountPath: /data/plugins/LuckPerms/config.yml subPath: config.yml resources: requests: memory: 5Gi cpu: 500m limits: memory: 6Gi cpu: 4000m 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 - name: purpurextras-config configMap: name: mudcraft-purpurextras - name: luckperms-config configMap: name: mudcraft-luckperms