feat: add minecraft server running monifactory
This commit is contained in:
5
minecraft/namespace.yaml
Normal file
5
minecraft/namespace.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: minecraft
|
||||
25
minecraft/pvc.yaml
Normal file
25
minecraft/pvc.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: monifactory-data
|
||||
namespace: minecraft
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 250Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: modpacks
|
||||
namespace: minecraft
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 25Gi
|
||||
10
minecraft/secrets.yaml
Normal file
10
minecraft/secrets.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
apiVersion: onepassword.com/v1
|
||||
kind: OnePasswordItem
|
||||
metadata:
|
||||
name: curseforge
|
||||
namespace: minecraft
|
||||
annotations:
|
||||
operator.1password.io/auto-restart: "true"
|
||||
spec:
|
||||
itemPath: "vaults/Lab/items/curseforge"
|
||||
15
minecraft/service.yaml
Normal file
15
minecraft/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: monifactory-server
|
||||
namespace: minecraft
|
||||
labels:
|
||||
app: monifactory-server
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: monifactory
|
||||
port: 25565
|
||||
selector:
|
||||
app: monifactory-server
|
||||
77
minecraft/statefulset.yaml
Normal file
77
minecraft/statefulset.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: monifactory-server
|
||||
namespace: minecraft
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: monifactory-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: monifactory-server
|
||||
spec:
|
||||
containers:
|
||||
- name: monifactory-server
|
||||
image: itzg/minecraft-server:java17
|
||||
env:
|
||||
- name: EULA
|
||||
value: "TRUE"
|
||||
- name: MODE
|
||||
value: "survival"
|
||||
- name: DIFFICULTY
|
||||
value: "peaceful"
|
||||
- name: MODPACK_PLATFORM
|
||||
value: "AUTO_CURSEFORGE"
|
||||
- name: CF_API_KEY
|
||||
value: "$2a$10$12Z0ZWRDkHKShnN2gdZdY./Cj8BjpzIdcwuFXx9HrPsPUH90vwHcK"
|
||||
- name: CF_PAGE_URL
|
||||
value: "https://www.curseforge.com/minecraft/modpacks/monifactory/"
|
||||
- name: VERSION
|
||||
value: "1.20.1"
|
||||
- name: INIT_MEMORY
|
||||
value: 4G
|
||||
- name: MAX_MEMORY
|
||||
value: 8G
|
||||
- name: ALLOW_FLIGHT
|
||||
value: "TRUE"
|
||||
- name: ENABLE_ROLLING_LOGS
|
||||
value: "TRUE"
|
||||
- name: USE_MEOWICE_FLAGS
|
||||
value: "TRUE"
|
||||
ports:
|
||||
- name: minecraft
|
||||
containerPort: 25565
|
||||
resources:
|
||||
requests:
|
||||
cpu: 4
|
||||
memory: "4Gi"
|
||||
limits:
|
||||
cpu: 8
|
||||
memory: "8Gi"
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mc-health
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mc-health
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
volumeMounts:
|
||||
- name: monifactory-data
|
||||
mountPath: /data
|
||||
- name: modpacks
|
||||
mountPath: /modpacks
|
||||
volumes:
|
||||
- name: monifactory-data
|
||||
persistentVolumeClaim:
|
||||
claimName: monifactory-data
|
||||
- name: modpacks
|
||||
persistentVolumeClaim:
|
||||
claimName: modpacks
|
||||
Reference in New Issue
Block a user