diff --git a/apps/asciinema-postgresql/cluster.yaml b/apps/asciinema-postgresql/cluster.yaml new file mode 100644 index 0000000..b4428fd --- /dev/null +++ b/apps/asciinema-postgresql/cluster.yaml @@ -0,0 +1,17 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: asciinema-postgresql + namespace: asciinema +spec: + instances: 1 + imageName: ghcr.io/cloudnative-pg/postgresql:18.6-standard-trixie + bootstrap: + initdb: + database: asciinema + owner: asciinema + secret: + name: asciinema-postgresql-bootstrap + storage: + size: 8Gi + storageClass: rook-ceph-block-ec diff --git a/apps/asciinema-postgresql/kustomization.yaml b/apps/asciinema-postgresql/kustomization.yaml new file mode 100644 index 0000000..993fbde --- /dev/null +++ b/apps/asciinema-postgresql/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - cluster.yaml diff --git a/apps/asciinema/values.yaml b/apps/asciinema/values.yaml index d721be6..af3e9b9 100644 --- a/apps/asciinema/values.yaml +++ b/apps/asciinema/values.yaml @@ -35,6 +35,7 @@ ingress: host: asciinema.brunner.ninja postgresql: + enabled: false persistence: storageClass: rook-ceph-block-ec size: 8Gi diff --git a/bootstrap/asciinema-postgresql.yaml b/bootstrap/asciinema-postgresql.yaml new file mode 100644 index 0000000..244e971 --- /dev/null +++ b/bootstrap/asciinema-postgresql.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: asciinema-postgresql + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + project: asciinema + source: + repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git + targetRevision: main + path: apps/asciinema-postgresql + destination: + server: https://kubernetes.default.svc + namespace: asciinema + syncPolicy: + automated: + enabled: true + prune: false + selfHeal: true diff --git a/bootstrap/asciinema-project.yaml b/bootstrap/asciinema-project.yaml index 54be19e..9ea16e6 100644 --- a/bootstrap/asciinema-project.yaml +++ b/bootstrap/asciinema-project.yaml @@ -28,5 +28,7 @@ spec: kind: Job - group: ceph.rook.io kind: CephObjectStoreUser + - group: postgresql.cnpg.io + kind: Cluster - group: networking.k8s.io kind: Ingress diff --git a/bootstrap/kustomization.yaml b/bootstrap/kustomization.yaml index 14db9b7..00f4bdb 100644 --- a/bootstrap/kustomization.yaml +++ b/bootstrap/kustomization.yaml @@ -31,6 +31,7 @@ resources: - authentik-project.yaml - authentik.yaml - asciinema-project.yaml +- asciinema-postgresql.yaml - asciinema.yaml - brave-sync-project.yaml - cert-manager-project.yaml