From ab25daddf7de213035f75f458c2c67100eda9536 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Fri, 4 Aug 2023 19:09:38 +0100 Subject: [PATCH] refactor(minecraft): split directories & add forge --- .../forge-modded-survival/values.yaml | 90 +++++++++++++++++++ .../resources/minecraft-load-balancer.yaml | 4 +- .../{ => vanilla-survival}/values.yaml | 28 +++--- 3 files changed, 107 insertions(+), 15 deletions(-) create mode 100644 cluster/minecraft-server/forge-modded-survival/values.yaml rename cluster/minecraft-server/{ => vanilla-survival}/values.yaml (82%) diff --git a/cluster/minecraft-server/forge-modded-survival/values.yaml b/cluster/minecraft-server/forge-modded-survival/values.yaml new file mode 100644 index 0000000..0774ef6 --- /dev/null +++ b/cluster/minecraft-server/forge-modded-survival/values.yaml @@ -0,0 +1,90 @@ +resources: + requests: + memory: "7512M" + limits: + memory: "8512M" + +strategyType: Recreate + +livenessProbe: + command: + - mc-health + initialDelaySeconds: 30 + periodSeconds: 5 + failureThreshold: 20 + successThreshold: 1 + timeoutSeconds: 1 +readinessProbe: + command: + - mc-health + initialDelaySeconds: 30 + periodSeconds: 5 + failureThreshold: 20 + successThreshold: 1 + timeoutSeconds: 1 +startupProbe: + command: + - mc-health + enabled: false + failureThreshold: 30 + periodSeconds: 10 + +deploymentLabels: + load-balancer: minecraft +podLabels: + load-balancer: minecraft + +minecraftServer: + eula: "TRUE" + version: "1.20.1" + type: "FORGE" + forgeVersion: "47.1.33" + difficulty: normal + whitelist: "Hamothy_,Aishwxrya" + ops: "Hamothy_,Aishwxrya" + viewDistance: 32 + motd: "Criminal Offensive Side-EYE" + pvp: true + levelType: DEFAULT + worldSaveName: ForgeModdedSurvival + memory: 6512M + maxWorldSize: 5999968 + + rcon: + enabled: true + existingSecret: minecraft-rcon + secretKey: rcon-password + +persistence: + dataDir: + enabled: true + Size: 10Gi + +mcbackup: + enabled: true + + image: + repository: itzg/mc-backup + tag: latest + pullPolicy: IfNotPresent + + initialDelay: 2m + backupInterval: "2h" + pauseIfNoPlayers: "true" + pruneBackupsDays: 3 + rconRetries: 5 + rconRetryInterval: 10s + excludes: "*.jar,cache,logs" + backupMethod: tar + destDir: /backups + linkLatest: "true" + compressMethod: "zstd" + + resources: + requests: + memory: 512Mi + + persistence: + backupDir: + enabled: true + Size: 20Gi diff --git a/cluster/minecraft-server/resources/minecraft-load-balancer.yaml b/cluster/minecraft-server/resources/minecraft-load-balancer.yaml index 331b44f..27b2583 100644 --- a/cluster/minecraft-server/resources/minecraft-load-balancer.yaml +++ b/cluster/minecraft-server/resources/minecraft-load-balancer.yaml @@ -5,10 +5,10 @@ metadata: namespace: minecraft-server spec: selector: - cursed: minecraft + load-balancer: minecraft type: LoadBalancer ports: - name: minecraft protocol: TCP port: 25565 - targetPort: 25565 \ No newline at end of file + targetPort: 25565 diff --git a/cluster/minecraft-server/values.yaml b/cluster/minecraft-server/vanilla-survival/values.yaml similarity index 82% rename from cluster/minecraft-server/values.yaml rename to cluster/minecraft-server/vanilla-survival/values.yaml index c6bc522..fea2edd 100644 --- a/cluster/minecraft-server/values.yaml +++ b/cluster/minecraft-server/vanilla-survival/values.yaml @@ -1,6 +1,8 @@ resources: requests: - memory: 3096Mi + memory: "3096M" + limits: + memory: "4096M" strategyType: Recreate @@ -27,21 +29,26 @@ startupProbe: failureThreshold: 30 periodSeconds: 10 +deploymentLabels: + load-balancer: minecraft +podLabels: + load-balancer: minecraft + minecraftServer: eula: "TRUE" version: "1.19.4" type: "VANILLA" difficulty: normal - whitelist: "Hamothy_,Aishwxyra" - viewDistance: 16 + whitelist: "Hamothy_,Aishwxrya" + ops: "Hamothy_,Aishwxrya" + viewDistance: 32 motd: "Criminal Offensive Side-EYE" pvp: true levelType: DEFAULT worldSaveName: MyWorld memory: 2512M + maxWorldSize: 5999968 overrideServerProperties: true - serviceType: ClusterIP - servicePort: 25565 rcon: enabled: true @@ -64,14 +71,14 @@ mcbackup: initialDelay: 2m backupInterval: "2h" pauseIfNoPlayers: "true" - pruneBackupsDays: 14 + pruneBackupsDays: 3 rconRetries: 5 rconRetryInterval: 10s excludes: "*.jar,cache,logs" backupMethod: tar destDir: /backups - linkLatest: "false" - compressMethod: "gzip" + linkLatest: "true" + compressMethod: "zstd" resources: requests: @@ -81,8 +88,3 @@ mcbackup: backupDir: enabled: true Size: 20Gi - -deploymentLabels: - cursed: minecraft -podLabels: - cursed: minecraft \ No newline at end of file