From 0a0e3982e8fe9ad471b88b44e4a5c01fc3018d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Limpinho?= <53994778+TomasLimpinho@users.noreply.github.com> Date: Thu, 5 Mar 2026 18:16:18 +0000 Subject: [PATCH] java edition --- roles/minecraft/files/minecraft-configmap.yaml | 15 +++++++++++++++ ...deployment.yaml => minecraft-statefulset.yaml} | 12 ++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 roles/minecraft/files/minecraft-configmap.yaml rename roles/minecraft/files/{minecraft-deployment.yaml => minecraft-statefulset.yaml} (80%) diff --git a/roles/minecraft/files/minecraft-configmap.yaml b/roles/minecraft/files/minecraft-configmap.yaml new file mode 100644 index 0000000..fb90a4d --- /dev/null +++ b/roles/minecraft/files/minecraft-configmap.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: minecraft-configmap + namespace: minecraft +data: + SERVER_NAME: "Example Minecraft Server" + EULA: "true" + VERSION: "1.21.1" + MAX_PLAYERS: "10" + OPS: | + tomas + ENABLE_WHITELIST: "true" + WHITELIST: | + tomas \ No newline at end of file diff --git a/roles/minecraft/files/minecraft-deployment.yaml b/roles/minecraft/files/minecraft-statefulset.yaml similarity index 80% rename from roles/minecraft/files/minecraft-deployment.yaml rename to roles/minecraft/files/minecraft-statefulset.yaml index 1a5ee77..c8af255 100644 --- a/roles/minecraft/files/minecraft-deployment.yaml +++ b/roles/minecraft/files/minecraft-statefulset.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: minecraft namespace: minecraft @@ -19,17 +19,17 @@ spec: - name: regcred containers: - name: minecraft - image: itzg/minecraft-bedrock-server + image: itzg/minecraft-server resources: requests: - cpu: 500m + cpu: 2 memory: 5Gi + envFrom: + - configMapRef: + name: minecraft-configmap ports: - containerPort: 19132 name: serverport - env: - - name: EULA - value: "TRUE" volumeMounts: - name: data mountPath: /data