From c84a502b30c148849c2bb3244553b863a8114afa Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 26 Oct 2023 11:35:05 -0500 Subject: [PATCH] Adding PeerTube. --- kubernetes/apps/fediverse/kustomization.yaml | 9 ++++ kubernetes/apps/fediverse/namespace.yaml | 7 +++ .../fediverse/peertube/app/kustomization.yaml | 8 +++ .../peertube/app/postgresCluster.yaml | 52 +++++++++++++++++++ kubernetes/apps/fediverse/peertube/ks.yaml | 20 +++++++ 5 files changed, 96 insertions(+) create mode 100644 kubernetes/apps/fediverse/kustomization.yaml create mode 100644 kubernetes/apps/fediverse/namespace.yaml create mode 100644 kubernetes/apps/fediverse/peertube/app/kustomization.yaml create mode 100644 kubernetes/apps/fediverse/peertube/app/postgresCluster.yaml create mode 100644 kubernetes/apps/fediverse/peertube/ks.yaml diff --git a/kubernetes/apps/fediverse/kustomization.yaml b/kubernetes/apps/fediverse/kustomization.yaml new file mode 100644 index 0000000..2239efe --- /dev/null +++ b/kubernetes/apps/fediverse/kustomization.yaml @@ -0,0 +1,9 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Pre Flux-Kustomizations + - ./namespace.yaml + # Flux-Kustomizations + - ./peertube/ks.yaml diff --git a/kubernetes/apps/fediverse/namespace.yaml b/kubernetes/apps/fediverse/namespace.yaml new file mode 100644 index 0000000..36e01c4 --- /dev/null +++ b/kubernetes/apps/fediverse/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: fediverse + labels: + kustomize.toolkit.fluxcd.io/prune: disabled diff --git a/kubernetes/apps/fediverse/peertube/app/kustomization.yaml b/kubernetes/apps/fediverse/peertube/app/kustomization.yaml new file mode 100644 index 0000000..251e7c1 --- /dev/null +++ b/kubernetes/apps/fediverse/peertube/app/kustomization.yaml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: fediverse +resources: + # - ./helmrelease.yaml + - ./postgresCluster.yaml diff --git a/kubernetes/apps/fediverse/peertube/app/postgresCluster.yaml b/kubernetes/apps/fediverse/peertube/app/postgresCluster.yaml new file mode 100644 index 0000000..1a6b057 --- /dev/null +++ b/kubernetes/apps/fediverse/peertube/app/postgresCluster.yaml @@ -0,0 +1,52 @@ +--- +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: peertube + namespace: security +spec: + postgresVersion: 15 + patroni: + dynamicConfiguration: + synchronous_mode: true + postgresql: + synchronous_commit: "on" + instances: + - name: postgres + replicas: 2 + dataVolumeClaimSpec: + storageClassName: ceph-block + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + users: + - name: peertube + databases: + - peertube + options: "SUPERUSER" + backups: + pgbackrest: + configuration: + - secret: + name: pgo-s3-creds + global: + archive-push-queue-max: 4GiB + repo1-retention-full: "14" + repo1-retention-full-type: time + repo1-path: /peertube/repo1 + repo1-s3-uri-style: path + manual: + repoName: repo1 + options: + - --type=full + repos: + - name: repo1 + schedules: + full: "0 1 * * 0" + differential: "0 1 * * 1-6" + s3: + bucket: "crunchy-postgres" + endpoint: "erebor.hsn.dev" + region: "us-east-1" diff --git a/kubernetes/apps/fediverse/peertube/ks.yaml b/kubernetes/apps/fediverse/peertube/ks.yaml new file mode 100644 index 0000000..66b4442 --- /dev/null +++ b/kubernetes/apps/fediverse/peertube/ks.yaml @@ -0,0 +1,20 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: cluster-apps-peertube + namespace: flux-system + labels: + substitution.flux.home.arpa/enabled: "true" +spec: + interval: 10m + path: "./kubernetes/apps/fediverse/peertube/app" + prune: true + sourceRef: + kind: GitRepository + name: valinor + wait: true + dependsOn: + - name: cluster-apps-external-secrets-stores + - name: cluster-apps-crunchy-postgres-operator