From 149087fb03c3bd405d8f99af0538d63c4b792450 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Sun, 17 Dec 2023 21:14:38 -0500 Subject: [PATCH] Add back minecraft --- games/minecraft/minecraft-data-pvc.yaml | 12 +++ games/minecraft/minecraft-deployment.yaml | 103 ++++++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 games/minecraft/minecraft-data-pvc.yaml create mode 100644 games/minecraft/minecraft-deployment.yaml diff --git a/games/minecraft/minecraft-data-pvc.yaml b/games/minecraft/minecraft-data-pvc.yaml new file mode 100644 index 0000000..5d9ea35 --- /dev/null +++ b/games/minecraft/minecraft-data-pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: minecraft-data-pvc + namespace: games-ns +spec: + accessModes: + - ReadWriteOnce + storageClassName: longhorn + resources: + requests: + storage: 16Gi diff --git a/games/minecraft/minecraft-deployment.yaml b/games/minecraft/minecraft-deployment.yaml new file mode 100644 index 0000000..3aa3e41 --- /dev/null +++ b/games/minecraft/minecraft-deployment.yaml @@ -0,0 +1,103 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: minecraft + namespace: games-ns +spec: + replicas: 1 + selector: + matchLabels: + app: games + template: + metadata: + labels: + app: games + spec: + #initContainers: + #- name: modpack-downloader + # image: alpine:latest + # volumeMounts: + # - name: minecraft-modpacks + # mountPath: /modpacks + # env: + # - name: MODPACK_URL + # #value: "https://s3.clortox.com/minecraft-modpacks/cf-modpack-latest.zip" + # value: "https://s3.clortox.com/minecraft-modpacks/modpack-latest.zip" + # command: ["/bin/sh"] + # args: + # - "-c" + # - | + # rm -rf /modpacks/* + # wget -O /modpacks/modpack.zip "$MODPACK_URL" + containers: + - name: minecraft + image: itzg/minecraft-server:java8-jdk + env: + - name: EULA + value: "TRUE" + - name: ENABLE_RCON + value: "TRUE" + - name: RCON_PORT + value: "28016" + - name: MEMORY + value: "8G" + - name: USE_AIKAR_FLAGS + value: "false" + - name: ENABLE_ROLLING_LOGS + value: "false" + - name: TZ + value: "America/New_York" + + - name: VERSION + value: "1.12.2" + - name: REMOVE_OLD_MODS + value: "TRUE" + + # Proper curseforge pack + #- name: TYPE + # value: "CURSEFORGE" + #- name: CF_SERVER_MOD + # value: "/modpacks/modpack.zip" + + # Generic Forge configuration + - name: TYPE + value: "FORGE" + - name: MODPACK + value: "https://s3.clortox.com/minecraft-modpacks/modpack-latest.zip" + #- name: CUSTOM_SERVER_PROPERTIES + # value: | + # level-type=EarthCubic + # level-name=big-world + # view-distance=16 + # vertical-view-distance=-1 + + - name: ICON + value: "https://s3.clortox.com/minecraft-modpacks/server-icon.png" + - name: OVERRIDE_ICON + value: "TRUE" + - name: MOTD + value: "Lol. Lmao Even." + - name: MAX_PLAYERS + value: "50" + - name: SPAWN_PROTECTION + value: "0" + - name: DIFFICULTY + value: "hard" + - name: OPS + value: "Gritos_Internos" + - name: ALLOW_FLIGHT + value: "TRUE" + ports: + - containerPort: 25565 + - containerPort: 28016 + volumeMounts: + - name: minecraft-data + mountPath: /data + - name: minecraft-modpacks + mountPath: /modpacks + volumes: + - name: minecraft-data + persistentVolumeClaim: + claimName: minecraft-data-pvc + - name: minecraft-modpacks + emptyDir: {}