Deploy Mumble with CloudNativePG and backups

This commit is contained in:
2026-10-25 07:55:04 +01:00
parent 84d34c85d6
commit 7c58e09226
8 changed files with 74 additions and 0 deletions
+1
View File
@@ -5,6 +5,7 @@ resources:
- postgresql/asciinema
- postgresql/authentik
- postgresql/default-mumble
- postgresql/mumble
- postgresql/default-shared
- postgresql/ghostfolio
- postgresql/grafana
@@ -0,0 +1,25 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: mumble
namePrefix: mumble-
resources: [../base]
patches:
- target: {kind: CronJob, name: postgresql-backup}
patch: |-
apiVersion: batch/v1
kind: CronJob
metadata: {name: postgresql-backup}
spec:
schedule: "0 4 * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: pg-dump
env:
- {name: BACKUP_TARGET, value: mumble}
- {name: PGHOST, value: mumble-postgresql-rw}
- {name: PGSSLMODE, value: require}
- name: PGPASSWORD
valueFrom: {secretKeyRef: {name: mumble-postgresql-superuser, key: password}}
+18
View File
@@ -0,0 +1,18 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: mumble-postgresql
namespace: mumble
spec:
instances: 1
imageName: ghcr.io/cloudnative-pg/postgresql:18.6-standard-trixie
enableSuperuserAccess: true
bootstrap:
initdb:
database: mumble
owner: mumble
secret:
name: mumble-secrets
storage:
size: 8Gi
storageClass: rook-ceph-block-ec
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
+2
View File
@@ -50,6 +50,8 @@ spec:
server: https://kubernetes.default.svc
- namespace: wiki-js
server: https://kubernetes.default.svc
- namespace: mumble
server: https://kubernetes.default.svc
namespaceResourceWhitelist:
- group: ""
kind: ConfigMap
+1
View File
@@ -97,6 +97,7 @@ resources:
- paperless.yaml
- mumble.yaml
- mumble-namespace.yaml
- mumble-postgresql.yaml
- minecraft-project.yaml
- minecraft-paper.yaml
- minecraft-atm10.yaml
+2
View File
@@ -1,4 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-wave: "-2"
name: mumble
+21
View File
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: mumble-postgresql
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
project: homelab
source:
repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
targetRevision: main
path: apps/mumble-postgresql
destination:
server: https://kubernetes.default.svc
namespace: mumble
syncPolicy:
automated:
enabled: true
prune: false
selfHeal: true