diff --git a/minecraft-server/minecraft-server.yaml b/minecraft-server/minecraft-server.yaml index 32c47be..1d6dacb 100644 --- a/minecraft-server/minecraft-server.yaml +++ b/minecraft-server/minecraft-server.yaml @@ -12,9 +12,10 @@ metadata: labels: app: minecraft-server spec: - type: LoadBalancer + type: ClusterIP ports: - name: minecraft port: 25565 + targetPort: 25565 selector: app: minecraft-server diff --git a/minecraft-server/ss.yaml b/minecraft-server/ss.yaml index e1875f3..625548e 100644 --- a/minecraft-server/ss.yaml +++ b/minecraft-server/ss.yaml @@ -21,20 +21,18 @@ spec: value: "TRUE" - name: MODE value: "survival" - - name: TYPE - value: "CURSEFORGE" - name: INIT_MEMORY value: 1G - name: MAX_MEMORY value: 4G - - name: CF_SERVER_MOD - value: "/modpacks/your-modpack.zip" - - name: ALLOW_FLIGHT - value: "TRUE" - - name: USE_AIKAR_FLAGS - value: "TRUE" - - name: RCON_PASSWORD - value: "rcon-password" + # - name: CF_SERVER_MOD + # value: "/modpacks/your-modpack.zip" + # - name: ALLOW_FLIGHT + # value: "TRUE" + # - name: USE_AIKAR_FLAGS + # value: "TRUE" + # - name: RCON_PASSWORD + # value: "rcon-password" ports: - name: minecraft containerPort: 25565 # Expose port 25565 @@ -50,21 +48,18 @@ spec: cpu: 2 #8 # Adjust based on expected workload memory: "4Gi" #"16Gi" # Adjust based on expected workload readinessProbe: - exec: - command: - - mcstatus - - 127.0.0.1 - - ping - initialDelaySeconds: 30 - periodSeconds: 30 + exec: + command: [ "/usr/local/bin/mc-monitor", "status", "--host", "localhost" ] + # Give it i + p * f seconds to be ready, so 120 seconds + initialDelaySeconds: 20 + periodSeconds: 5 + failureThreshold: 20 + # Monitor ongoing liveness livenessProbe: exec: - command: - - mcstatus - - 127.0.0.1 - - ping - initialDelaySeconds: 30 - periodSeconds: 30 + command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"] + initialDelaySeconds: 120 + periodSeconds: 60 volumeMounts: - name: minecraft-data mountPath: /data