Move Minecraft PostgreSQL to CloudNativePG

This commit is contained in:
feedc0de committed 2026-10-25 12:56:00 +01:00
1 parent 4b0afad165
commit f73bc60cba
9 files changed
+73 -13

No files matched your search

@@ -0,0 +1,18 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: paper-cnpg
namespace: mcserver
spec:
instances: 1
enableSuperuserAccess: true
imageName: ghcr.io/cloudnative-pg/postgresql:18.6-standard-trixie
bootstrap:
initdb:
database: minecraft
owner: minecraft
secret:
name: paper-cnpg-bootstrap
storage:
size: 8Gi
storageClass: rook-ceph-block-ec
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: paper-postgresql
namespace: mcserver
spec:
type: ClusterIP
ports:
- name: postgresql
port: 5432
protocol: TCP
targetPort: 5432
selector:
cnpg.io/cluster: paper-cnpg
cnpg.io/instanceRole: primary