diff --git a/apps/mastodon-postgresql/cluster.yaml b/apps/mastodon-postgresql/cluster.yaml new file mode 100644 index 0000000..6acd762 --- /dev/null +++ b/apps/mastodon-postgresql/cluster.yaml @@ -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 diff --git a/apps/mastodon-postgresql/kustomization.yaml b/apps/mastodon-postgresql/kustomization.yaml new file mode 100644 index 0000000..a589202 --- /dev/null +++ b/apps/mastodon-postgresql/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- cluster.yaml diff --git a/bootstrap/fediverse-project.yaml b/bootstrap/fediverse-project.yaml new file mode 100644 index 0000000..36ed287 --- /dev/null +++ b/bootstrap/fediverse-project.yaml @@ -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 diff --git a/bootstrap/kustomization.yaml b/bootstrap/kustomization.yaml index 25aded5..713021b 100644 --- a/bootstrap/kustomization.yaml +++ b/bootstrap/kustomization.yaml @@ -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 diff --git a/bootstrap/mastodon-postgresql.yaml b/bootstrap/mastodon-postgresql.yaml new file mode 100644 index 0000000..e101c03 --- /dev/null +++ b/bootstrap/mastodon-postgresql.yaml @@ -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