minecraft
This commit is contained in:
parent
d385672334
commit
6fd9519cb2
3 changed files with 251 additions and 12 deletions
minecraft
|
@ -1,26 +1,32 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: tfg
|
||||
namespace: minecraft
|
||||
labels:
|
||||
app.kubernetes.io/name: tfg
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: tfg
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
namespace: minecraft
|
||||
labels:
|
||||
app.kubernetes.io/name: tfg
|
||||
containertype: minecraft-server
|
||||
spec:
|
||||
containers:
|
||||
- name: tfg
|
||||
image: itzg/minecraft-server:java21-graalvm
|
||||
env:
|
||||
# Let jvm figure out memory based on limits
|
||||
- name: MEMORY
|
||||
value: ""
|
||||
- name: JVM_XX_OPTS
|
||||
value: "-XX:MaxRAMPercentage=75"
|
||||
|
||||
- name: ALLOW_FLIGHT
|
||||
value: "true"
|
||||
- name: CF_API_KEY
|
||||
|
@ -38,8 +44,7 @@ spec:
|
|||
value: "TRUE"
|
||||
- name: MAX_TICK_TIME
|
||||
value: "-1"
|
||||
- name: MEMORY
|
||||
value: 12G
|
||||
|
||||
- name: MOD_PLATFORM
|
||||
value: AUTO_CURSEFORGE
|
||||
- name: ONLINE_MODE
|
||||
|
@ -48,6 +53,7 @@ spec:
|
|||
value: "true"
|
||||
- name: SPAWN_PROTECTION
|
||||
value: "0"
|
||||
|
||||
- name: OPS
|
||||
value: |
|
||||
RoyalCat33
|
||||
|
@ -56,16 +62,32 @@ spec:
|
|||
ports:
|
||||
- containerPort: 25565
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1"
|
||||
memory: "2Gi"
|
||||
limits:
|
||||
cpu: "4"
|
||||
memory: "10Gi"
|
||||
readinessProbe:
|
||||
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:
|
||||
["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 60
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: tfg-data
|
||||
- mountPath: /downloads
|
||||
name: curseforge-downloads
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: tfg-data
|
||||
persistentVolumeClaim:
|
||||
claimName: tfg-data
|
||||
- name: curseforge-downloads
|
||||
persistentVolumeClaim:
|
||||
claimName: curseforge-downloads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue