Files
homelab-gitops/apps/minecraft-atm10/deployment.yaml
T

84 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: atm10
labels:
app.kubernetes.io/name: minecraft-atm10
app.kubernetes.io/instance: atm10
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: minecraft-atm10
app.kubernetes.io/instance: atm10
template:
metadata:
labels:
app.kubernetes.io/name: minecraft-atm10
app.kubernetes.io/instance: atm10
spec:
automountServiceAccountToken: false
terminationGracePeriodSeconds: 600
nodeSelector:
kubernetes.io/hostname: arschrock
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
securityContext:
runAsUser: 1000
runAsGroup: 1000
containers:
- name: atm10
image: docker.io/library/eclipse-temurin:21.0.12_8-jre-noble
imagePullPolicy: IfNotPresent
workingDir: /data
command: [java]
args:
- '@user_jvm_args.txt'
- '@libraries/net/neoforged/neoforge/21.1.224/unix_args.txt'
- nogui
ports:
- name: minecraft
containerPort: 25565
protocol: TCP
startupProbe:
tcpSocket:
port: minecraft
periodSeconds: 10
failureThreshold: 120
readinessProbe:
tcpSocket:
port: minecraft
periodSeconds: 10
failureThreshold: 3
volumeMounts:
- name: server-data
mountPath: /data
- name: mc-monitor
image: docker.io/itzg/mc-monitor:1.18.3
imagePullPolicy: IfNotPresent
args:
- export-for-prometheus
- -servers
- 127.0.0.1:25565
- -port
- '8080'
- -timeout
- 10s
ports:
- name: metrics
containerPort: 8080
readinessProbe:
httpGet:
path: /metrics
port: metrics
periodSeconds: 10
volumes:
- name: server-data
hostPath:
path: /home/feedc0de/ATM10
type: Directory