Skip to content

Commit 0b2b9ff

Browse files
committed
feat(minecraft): deploy rlcraft server
Deploy RLcraft server, temporarily pause in init to download mods.
1 parent cf4230c commit 0b2b9ff

File tree

2 files changed

+185
-0
lines changed

2 files changed

+185
-0
lines changed
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: minecraft-rlcraft
5+
finalizers:
6+
- resources-finalizer.argocd.argoproj.io
7+
spec:
8+
project: minecraft
9+
source:
10+
repoURL: https://itzg.github.io/minecraft-server-charts
11+
targetRevision: 5.0.0
12+
chart: minecraft
13+
helm:
14+
valuesObject:
15+
image:
16+
tag: java8
17+
initContainers:
18+
- name: fix-config-permissions
19+
image: busybox
20+
command:
21+
- sh
22+
- -c
23+
- |
24+
mkdir -p /data/config
25+
chown -R 1000:1000 /data
26+
sleep infinity
27+
securityContext:
28+
runAsUser: 0
29+
runAsGroup: 0
30+
runAsNonRoot: false
31+
volumeMounts:
32+
- name: datadir
33+
mountPath: /data
34+
35+
serviceAnnotations:
36+
mc-router.itzg.me/externalServerName: "rl.gug.d3adb5.ca"
37+
workloadAsStatefulSet: true
38+
strategyType: RollingUpdate
39+
persistence:
40+
storageClass: longhorn
41+
dataDir:
42+
enabled: true
43+
Size: 20Gi
44+
resources:
45+
requests:
46+
cpu: 2
47+
memory: 10Gi
48+
limits:
49+
memory: 10Gi
50+
extraEnv:
51+
USE_MEOWICE_FLAGS: "true"
52+
minecraftServer:
53+
eula: true
54+
type: FORGE
55+
version: "1.12.2"
56+
difficulty: normal
57+
whitelist: {{ join "," .Values.minecraft.server.rlcraft.whitelist }}
58+
ops: {{ join "," .Values.minecraft.server.rlcraft.ops }}
59+
maxPlayers: 16
60+
allowNether: true
61+
announcePlayerAchievements: true
62+
spawnProtection: 0
63+
viewDistance: 16
64+
motd: "This time I'm really gonna do it."
65+
icon: "http://0x0.st/K_t4.png"
66+
rcon:
67+
enabled: true
68+
existingSecret: minecraft-rlcraft-secrets
69+
secretKey: rcon-password
70+
memory: 81928M
71+
72+
extraPorts:
73+
- name: voice-chat
74+
containerPort: 24450
75+
protocol: UDP
76+
service:
77+
enabled: true
78+
embedded: false
79+
annotations:
80+
metallb.universe.tf/allow-shared-ip: {{ .Values.metallb.ipSharingKey }}
81+
type: LoadBalancer
82+
port: 24450
83+
84+
mcbackup:
85+
enabled: true
86+
pruneBackupDays: 7
87+
persistence:
88+
storageClass: truenas-iscsi-hdd
89+
backupDir:
90+
enabled: true
91+
Size: 50Gi
92+
93+
affinity:
94+
podAntiAffinity:
95+
preferredDuringSchedulingIgnoredDuringExecution:
96+
- weight: 100
97+
podAffinityTerm:
98+
labelSelector:
99+
matchExpressions:
100+
- key: app.kubernetes.io/name
101+
operator: In
102+
values:
103+
- minecraft
104+
topologyKey: kubernetes.io/hostname
105+
106+
extraVolumes:
107+
- volumes:
108+
- name: voice-chat-config
109+
configMap:
110+
name: minecraft-rlcraft-voice-chat-config
111+
volumeMounts:
112+
- name: voice-chat-config
113+
mountPath: /data/config/voicechat/voicechat-server.properties
114+
subPath: voicechart-server.properties
115+
116+
extraDeploy:
117+
- |
118+
apiVersion: bitnami.com/v1alpha1
119+
kind: SealedSecret
120+
metadata:
121+
name: minecraft-rlcraft-secrets
122+
spec:
123+
encryptedData:
124+
{{- range $key, $value := .Values.minecraft.server.rlcraft.secrets }}
125+
{{ $key }}: {{ splitList "\n" $value | join "" }}
126+
{{- end }}
127+
- |
128+
apiVersion: v1
129+
kind: ConfigMap
130+
metadata:
131+
name: minecraft-rlcraft-voice-chat-config
132+
data:
133+
voicechart-server.properties: |
134+
port=24450
135+
bind_address=
136+
max_voice_distance=48.0
137+
crouch_distance_multiplier=1.0
138+
whisper_distance_multiplier=0.5
139+
codec=VOIP
140+
mtu_size=1024
141+
keep_alive=1000
142+
enable_groups=true
143+
voice_host=rl.gug.d3adb5.ca
144+
allow_recording=true
145+
spectator_interaction=false
146+
spectator_player_possession=false
147+
force_voice_chat=false
148+
login_timeout=10000
149+
broadcast_range=-1.0
150+
allow_pings=true
151+
use_natives=true
152+
153+
destination:
154+
server: https://kubernetes.default.svc
155+
namespace: {{ .Values.minecraft.namespace }}
156+
157+
syncPolicy:
158+
automated:
159+
prune: true
160+
selfHeal: true
161+
syncOptions:
162+
- CreateNamespace=true

argo/app-of-apps/values.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,29 @@ democraticCsi:
180180
minecraft:
181181
namespace: minecraft
182182
server:
183+
rlcraft:
184+
whitelist:
185+
- ab9c17
186+
- OnyxKier
187+
- Harkly_
188+
- Nightmar35
189+
ops:
190+
- ab9c17
191+
- OnyxKier
192+
- Harkly_
193+
- Nightmar35
194+
secrets:
195+
rcon-password: |-
196+
AgA4aG8bclIN5h2/PBu5lnMJ11r5bL0f8nzRc2escYFiLoe4Mzyezz2C+0VmOU5G5vJpNwTstAXTJc92
197+
ZoFKrKGIoihbrWG70G0s9c9qYJkZt8whZzT4fSfl9vxcPnOPrY8oor77iPjHg67lYOqlWdNGWreG3f5t
198+
DyUlic+WCepHHRz4ihg7mPXC4/FxOfPvEWnEL7ugA+6PPqvgnHttjLWRLEIH74zDtYKmD3uSaGTQ9ocT
199+
6hc4w3J0b/2+PHkxymiddS4RQR5AwE1iViRxUjhheTFAkQGSel00pXv9dN7oDsboSLUk6iDEPqbOuBB6
200+
6GlHZF5S4+57aUyuY3g/fWnWIr+A5YTIpn8u9ccSrVUGktaUxbAI43V+wflgbTIfx4yk1cULNoucRQy9
201+
+ebH8F8zuA40u0JM8JrIzLLIJrKvdLeWYw5vX4dQRcRYxGr8GPvUaNmd4BcqJE/LgpkpGLr4I/hnNb9Q
202+
HiGJKUCHLGv7vTCdI/XyCA4Ktpevke4hrZbtejJ+t0P95q1/KPSU71JJiVyVDuPS/X4WJgbUQTvcuIYm
203+
GdDkht7NKVoSGbh99W7MgxWTMuiZS/lnohMNbWT6Ilgae476SUAXRASAxX5npaZHbwbz17gK8LRXZSuM
204+
SzaZBn52czMD2bOHlpcjvZ40wZaZcjpi+d3+Grjp3ZrhyResROlfVjQuedN3OwouJDWOX3BmTnFBmsIE
205+
LhdFbSTySq+e/uYZ1YUiWgkLfiZ5N4DJzfiMy1wOemw9I7A=
183206
gug:
184207
whitelist:
185208
- ab9c17

0 commit comments

Comments
 (0)