fix(mudcraft): fix LuckPerms init by removing subPath mounts
SubPath mounts into plugin directories were causing k8s to create those directories owned by root before the server process could write to them. LuckPerms was failing with "Unable to create libs directory" as a result. Move config injection to the initContainer: it now cleans stale JARs (rm *.jar), copies fresh JARs from the plugins image, and pre-creates the LuckPerms and PurpurExtras directories with configs copied from ConfigMaps. Main container no longer mounts configs via subPath. Also fixes stale JAR accumulation — initContainer now clears old JARs before copying, preventing broken old versions from loading.
This commit is contained in:
@@ -17,7 +17,7 @@ spec:
|
||||
labels:
|
||||
app: mudcraft
|
||||
annotations:
|
||||
kubectl.kubernetes.io/restartedAt: "2026-03-30T01:15:00Z"
|
||||
kubectl.kubernetes.io/restartedAt: "2026-03-30T02:00:00Z"
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 120
|
||||
initContainers:
|
||||
@@ -27,10 +27,24 @@ spec:
|
||||
- name: install-plugins
|
||||
image: registry.neuralplatform.ai/mudcraft/plugins:e41f6256805c28b3bb8e8832293afa3eab701082
|
||||
imagePullPolicy: Always
|
||||
command: ["sh", "-c", "cp -r /plugins/* /target/ && echo 'Plugins installed'"]
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
rm -rf /target/*.jar
|
||||
cp -r /plugins/* /target/
|
||||
mkdir -p /target/LuckPerms
|
||||
cp /luckperms-config/config.yml /target/LuckPerms/config.yml
|
||||
mkdir -p /target/PurpurExtras
|
||||
cp /purpurextras-config/config.yml /target/PurpurExtras/config.yml
|
||||
echo 'Plugins installed'
|
||||
volumeMounts:
|
||||
- name: plugins
|
||||
mountPath: /target
|
||||
- name: luckperms-config
|
||||
mountPath: /luckperms-config
|
||||
- name: purpurextras-config
|
||||
mountPath: /purpurextras-config
|
||||
containers:
|
||||
- name: mudcraft
|
||||
image: itzg/minecraft-server:java21
|
||||
@@ -75,12 +89,6 @@ spec:
|
||||
mountPath: /data/plugins
|
||||
- name: logs
|
||||
mountPath: /data/logs
|
||||
- name: purpurextras-config
|
||||
mountPath: /data/plugins/PurpurExtras/config.yml
|
||||
subPath: config.yml
|
||||
- name: luckperms-config
|
||||
mountPath: /data/plugins/LuckPerms/config.yml
|
||||
subPath: config.yml
|
||||
resources:
|
||||
requests:
|
||||
memory: 5Gi
|
||||
|
||||
Reference in New Issue
Block a user