-
Notifications
You must be signed in to change notification settings - Fork 0
/
mc-server-java_agones-fleet.yml
92 lines (89 loc) · 3.16 KB
/
mc-server-java_agones-fleet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
apiVersion: "agones.dev/v1"
kind: Fleet
metadata:
name: mc-oci-java
spec:
replicas: 2
scheduling: Packed
strategy:
type: Recreate
template:
metadata:
labels:
game: mc-oci
edition: java
annotations:
external-dns.alpha.kubernetes.io/hostname: piday.com
external-dns.alpha.kubernetes.io/gameserver-service: minecraft
spec:
container: mc-server # Minecraft server container name
ports:
- name: mc-oci
portPolicy: Dynamic
container: mc-server
containerPort: 25565
protocol: TCP
health:
initialDelaySeconds: 300
periodSeconds: 12
failureThreshold: 5
template:
spec:
containers:
- name: mc-server
image: itzg/minecraft-server # Minecraft Java server image
env: # Full list of ENV variables at https://github.com/itzg/docker-minecraft-server
- name: EULA
value: "TRUE"
- name: MAX_MEMORY
value: "3G"
- name: INIT_MEMORY
value: "3G"
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /data # shared vol with mc-load and mc-backup
name: world-vol
ports:
- containerPort: 25575 # exposes the RCON port to within the cluster from the pod's IP
- name: mc-monitor
image: iad.ocir.io/idi2cuxxbkto/piday/mc-monitor-agones-java:latest
env:
- name: PING_INTERVAL
value: "10"
- name: MC_TIMEOUT
value: "10"
- name: MAX_ATTEMPTS
value: "20"
- name: WARMUP_TIME
value: "100"
imagePullPolicy: Always
- name: mc-backup
image: iad.ocir.io/idi2cuxxbkto/piday/mc-oci-backup:latest
args:
- backup
env:
- name: BUCKET_NAME
value: "j2joib" #"agones-minecraft-mc-worlds"
- name: BACKUP_CRON
value: "0 */6 * * *"
- name: INITIAL_DELAY
value: "60s"
- name: VOLUME
value: "/data"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name # GameServer ref for naming backup zip files
- name: RCON_PASSWORD
value: minecraft # default rcon password. If provided RCON connection will be used to execute 'save-all' before a backup job.
# Change the rcon password when exposing RCON port outside the pod
- name: ENVIRONMENT
value: "development"
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /data # shared vol with mc-server
name: world-vol
volumes:
- name: world-vol # shared vol between containers. will not persist between restarts
imagePullSecrets:
- name: ocirsecret