Stage Mastodon CloudNativePG cluster

This commit is contained in:
2026-10-22 17:29:24 +02:00
parent 3594c2cbc7
commit e069ecf8c3
5 changed files with 105 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: mastodon-postgresql
namespace: mastodon
spec:
instances: 3
imageName: ghcr.io/cloudnative-pg/postgresql:17.11-standard-trixie
affinity:
podAntiAffinityType: required
bootstrap:
initdb:
database: mastodon
owner: mastodon
encoding: UTF8
localeCollate: en_US.utf8
localeCType: en_US.utf8
dataChecksums: true
storage:
size: 20Gi
storageClass: rook-ceph-block-ec
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
+57
View File
@@ -0,0 +1,57 @@
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: fediverse
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
description: Fediverse applications and their dedicated data services
sourceRepos:
- https://code.brunner.ninja/feedc0de/homelab-gitops.git
- https://mastodon.github.io/helm-charts/
- https://brunner.ninja/charts
destinations:
- namespace: mastodon
server: https://kubernetes.default.svc
- namespace: pixelfed
server: https://kubernetes.default.svc
- namespace: loops
server: https://kubernetes.default.svc
- namespace: rook-ceph
server: https://kubernetes.default.svc
namespaceResourceWhitelist:
- group: ""
kind: ConfigMap
- group: ""
kind: PersistentVolumeClaim
- group: ""
kind: Secret
- group: ""
kind: Service
- group: ""
kind: ServiceAccount
- group: apps
kind: Deployment
- group: apps
kind: StatefulSet
- group: batch
kind: CronJob
- group: batch
kind: Job
- group: networking.k8s.io
kind: Ingress
- group: policy
kind: PodDisruptionBudget
- group: postgresql.cnpg.io
kind: Cluster
- group: monitoring.coreos.com
kind: PodMonitor
- group: monitoring.coreos.com
kind: ServiceMonitor
- group: traefik.io
kind: IngressRoute
- group: traefik.io
kind: Middleware
- group: ceph.rook.io
kind: CephObjectStoreUser
+2
View File
@@ -98,6 +98,8 @@ resources:
- quay.yaml
- nextcloud-project.yaml
- nextcloud.yaml
- fediverse-project.yaml
- mastodon-postgresql.yaml
- nextcloud-whiteboard.yaml
- nextcloud-talk-hpb.yaml
- nextcloud-clamav.yaml
+21
View File
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: mastodon-postgresql
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
project: fediverse
source:
repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git
targetRevision: main
path: apps/mastodon-postgresql
destination:
server: https://kubernetes.default.svc
namespace: mastodon
syncPolicy:
automated:
enabled: true
prune: false
selfHeal: true