This commit is contained in:
parent
8231ccbcfd
commit
2ac74d4dee
12
games/minecraft/minecraft-data-pvc.yaml
Normal file
12
games/minecraft/minecraft-data-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: minecraft-data-pvc
|
||||
namespace: games-ns
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 16Gi
|
40
games/minecraft/minecraft-deployment.yaml
Normal file
40
games/minecraft/minecraft-deployment.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minecraft
|
||||
namespace: games-ns
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: games
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: games
|
||||
spec:
|
||||
containers:
|
||||
- name: minecraft
|
||||
image: itzg/minecraft-server
|
||||
#env:
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
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
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 60
|
||||
volumeMounts:
|
||||
- name: minecraft-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: minecraft-data
|
||||
persistentVolumeClaim:
|
||||
claimName: minecraft-data-pvc
|
Loading…
Reference in New Issue
Block a user