Configure LuckPerms with PostgreSQL backend for persistent permissions
- LuckPerms stores all permissions/groups in Postgres (not ephemeral ops.json) - Mount luckperms config.yml from ConfigMap with DB connection details - LP_PASSWORD injected from same secret as DB_PASSWORD - OPS env var kept as bootstrap until LuckPerms admin group is configured
This commit is contained in:
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: mudcraft-luckperms
|
||||||
|
namespace: mudcraft
|
||||||
|
data:
|
||||||
|
config.yml: |
|
||||||
|
# LuckPerms configuration for MUDCraft
|
||||||
|
# Storage backend: PostgreSQL (shared cluster Postgres)
|
||||||
|
|
||||||
|
server: mudcraft
|
||||||
|
|
||||||
|
storage-method: postgresql
|
||||||
|
|
||||||
|
data:
|
||||||
|
address: postgres-postgresql.platform.svc.cluster.local:5432
|
||||||
|
database: mudcraft
|
||||||
|
username: mudcraft
|
||||||
|
# Password injected at runtime via LP_PASSWORD env var (see statefulset)
|
||||||
|
password: ${LP_PASSWORD}
|
||||||
|
pool-settings:
|
||||||
|
maximum-pool-size: 10
|
||||||
|
minimum-idle: 10
|
||||||
|
maximum-lifetime: 1800000
|
||||||
|
connection-timeout: 5000
|
||||||
|
|
||||||
|
# Use UUID cache so player lookups don't hit Mojang API on every join
|
||||||
|
use-server-uuid-cache: true
|
||||||
|
|
||||||
|
# Sync permissions across any future additional server instances
|
||||||
|
messaging-service: none
|
||||||
|
|
||||||
|
# Auto-save player data when they disconnect
|
||||||
|
auto-save: true
|
||||||
|
|
||||||
|
log-notify: true
|
||||||
@@ -61,6 +61,11 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: mudcraft-secrets
|
name: mudcraft-secrets
|
||||||
key: db-password
|
key: db-password
|
||||||
|
- name: LP_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mudcraft-secrets
|
||||||
|
key: db-password
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: worlds
|
- name: worlds
|
||||||
mountPath: /data/worlds
|
mountPath: /data/worlds
|
||||||
@@ -71,6 +76,9 @@ spec:
|
|||||||
- name: purpurextras-config
|
- name: purpurextras-config
|
||||||
mountPath: /data/plugins/PurpurExtras/config.yml
|
mountPath: /data/plugins/PurpurExtras/config.yml
|
||||||
subPath: config.yml
|
subPath: config.yml
|
||||||
|
- name: luckperms-config
|
||||||
|
mountPath: /data/plugins/LuckPerms/config.yml
|
||||||
|
subPath: config.yml
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 5Gi
|
memory: 5Gi
|
||||||
@@ -107,3 +115,6 @@ spec:
|
|||||||
- name: purpurextras-config
|
- name: purpurextras-config
|
||||||
configMap:
|
configMap:
|
||||||
name: mudcraft-purpurextras
|
name: mudcraft-purpurextras
|
||||||
|
- name: luckperms-config
|
||||||
|
configMap:
|
||||||
|
name: mudcraft-luckperms
|
||||||
|
|||||||
Reference in New Issue
Block a user