125 lines
3.0 KiB
YAML
125 lines
3.0 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: minecraft
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: minecraft
|
|
namespace: minecraft
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: minecraft
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: minecraft
|
|
spec:
|
|
containers:
|
|
- name: tailscale
|
|
image: tailscale/tailscale:latest
|
|
env:
|
|
- name: TS_STATE_DIR
|
|
value: "/var/lib/tailscale"
|
|
- name: TS_KUBE_SECRET
|
|
value: ""
|
|
- name: TS_AUTHKEY
|
|
value: "tskey-auth-REPLACE_ME"
|
|
- name: TS_HOSTNAME
|
|
value: "minecraft"
|
|
volumeMounts:
|
|
- name: tailscale-data
|
|
mountPath: /var/lib/tailscale
|
|
- name: dev-tun
|
|
mountPath: /dev/net/tun
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_ADMIN
|
|
- SYS_MODULE
|
|
- name: minecraft
|
|
image: itzg/minecraft-server:java21
|
|
stdin: true
|
|
tty: true
|
|
env:
|
|
- name: EULA
|
|
value: "true"
|
|
- name: MEMORY
|
|
value: "6G"
|
|
- name: CF_OVERRIDES_EXCLUSIONS
|
|
value: |
|
|
# Not applicable for server side
|
|
shaderpacks/**
|
|
volumeMounts:
|
|
- name: minecraft-data
|
|
mountPath: /data
|
|
- name: modpacks
|
|
mountPath: /modpacks
|
|
readOnly: true
|
|
resources:
|
|
requests:
|
|
memory: "6Gi"
|
|
limits:
|
|
memory: "8Gi"
|
|
- name: minecraft-cobblemon
|
|
image: itzg/minecraft-server:java21
|
|
stdin: true
|
|
tty: true
|
|
env:
|
|
- name: EULA
|
|
value: "true"
|
|
- name: TYPE
|
|
value: "AUTO_CURSEFORGE"
|
|
- name: CF_MODPACK_ZIP
|
|
value: "/modpacks/COBBLEVERSE-1.7.30-CF.zip"
|
|
- name: CF_API_KEY
|
|
value: "$CF_API_KEY"
|
|
- name: MEMORY
|
|
value: "4G"
|
|
- name: SERVER_PORT
|
|
value: "2222"
|
|
- name: RCON_PORT
|
|
value: "25576"
|
|
- name: CF_OVERRIDES_EXCLUSIONS
|
|
value: |
|
|
# Not applicable for server side
|
|
shaderpacks/**
|
|
resourcepacks/**
|
|
volumeMounts:
|
|
- name: cobblemon-data
|
|
mountPath: /data
|
|
- name: modpacks
|
|
mountPath: /modpacks
|
|
readOnly: true
|
|
resources:
|
|
requests:
|
|
memory: "4Gi"
|
|
limits:
|
|
memory: "6Gi"
|
|
volumes:
|
|
- name: minecraft-data
|
|
hostPath:
|
|
path: /data/minecraft/data
|
|
type: DirectoryOrCreate
|
|
- name: modpacks
|
|
hostPath:
|
|
path: /data/minecraft/modpacks
|
|
type: DirectoryOrCreate
|
|
- name: tailscale-data
|
|
hostPath:
|
|
path: /data/minecraft/tailscale
|
|
type: DirectoryOrCreate
|
|
- name: dev-tun
|
|
hostPath:
|
|
path: /dev/net/tun
|
|
type: CharDevice
|
|
- name: cobblemon-data
|
|
hostPath:
|
|
path: /data/minecraft/cobblemon-data
|
|
type: DirectoryOrCreate
|