From c1165934b1c86be12889362618f6cb12bb96033a Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 12 Dec 2025 15:44:16 -0600 Subject: [PATCH] add cluster --- clusters/cl01tl/helm/jellyfin/Chart.yaml | 2 +- clusters/cl01tl/helm/jellystat/Chart.lock | 7 +- clusters/cl01tl/helm/jellystat/Chart.yaml | 4 + .../jellystat/templates/external-secret.yaml | 67 +++++++++++++++++ clusters/cl01tl/helm/jellystat/values.yaml | 74 +++++++++++++++++++ 5 files changed, 151 insertions(+), 3 deletions(-) diff --git a/clusters/cl01tl/helm/jellyfin/Chart.yaml b/clusters/cl01tl/helm/jellyfin/Chart.yaml index c0b0c7739..d1b99f4dc 100644 --- a/clusters/cl01tl/helm/jellyfin/Chart.yaml +++ b/clusters/cl01tl/helm/jellyfin/Chart.yaml @@ -22,4 +22,4 @@ dependencies: repository: https://bjw-s-labs.github.io/helm-charts/ version: 4.5.0 icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/jellyfin.png -appVersion: 10.10.7 +appVersion: 10.11.4 diff --git a/clusters/cl01tl/helm/jellystat/Chart.lock b/clusters/cl01tl/helm/jellystat/Chart.lock index 7ed0c23a0..3ddb4449f 100644 --- a/clusters/cl01tl/helm/jellystat/Chart.lock +++ b/clusters/cl01tl/helm/jellystat/Chart.lock @@ -5,5 +5,8 @@ dependencies: - name: postgres-cluster repository: oci://harbor.alexlebens.net/helm-charts version: 6.16.1 -digest: sha256:6c8b6a56bcdad0ea3f8e998c28642deaf449a7a37aea8ba9616d88fcc6d2bc14 -generated: "2025-12-05T17:06:11.6747146Z" +- name: postgres-cluster + repository: oci://harbor.alexlebens.net/helm-charts + version: 6.16.1 +digest: sha256:9fdd1121bfb8d7df9ff2c9e92a89678db470204f0133afb888e43db88aaf1425 +generated: "2025-12-12T15:43:52.208392-06:00" diff --git a/clusters/cl01tl/helm/jellystat/Chart.yaml b/clusters/cl01tl/helm/jellystat/Chart.yaml index 5c2affb89..cc5788a19 100644 --- a/clusters/cl01tl/helm/jellystat/Chart.yaml +++ b/clusters/cl01tl/helm/jellystat/Chart.yaml @@ -23,5 +23,9 @@ dependencies: alias: postgres-17-cluster version: 6.16.1 repository: oci://harbor.alexlebens.net/helm-charts + - name: postgres-cluster + alias: postgres-18-cluster + version: 6.16.1 + repository: oci://harbor.alexlebens.net/helm-charts icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/jellystat.png appVersion: 1.1.6 diff --git a/clusters/cl01tl/helm/jellystat/templates/external-secret.yaml b/clusters/cl01tl/helm/jellystat/templates/external-secret.yaml index 71f3821bb..9014cacb3 100644 --- a/clusters/cl01tl/helm/jellystat/templates/external-secret.yaml +++ b/clusters/cl01tl/helm/jellystat/templates/external-secret.yaml @@ -157,3 +157,70 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_REGION + +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: jellystat-postgresql-18-cluster-backup-secret + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: jellystat-postgresql-18-cluster-backup-secret + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: access + - secretKey: ACCESS_SECRET_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: secret + +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: jellystat-postgresql-18-cluster-backup-secret-garage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: jellystat-postgresql-18-cluster-backup-secret-garage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_KEY_ID + - secretKey: ACCESS_SECRET_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/helm/jellystat/values.yaml b/clusters/cl01tl/helm/jellystat/values.yaml index e0cf55d9c..1daa1cf06 100644 --- a/clusters/cl01tl/helm/jellystat/values.yaml +++ b/clusters/cl01tl/helm/jellystat/values.yaml @@ -134,3 +134,77 @@ postgres-17-cluster: # suspend: false # schedule: "0 6 4 * * SAT" # backupName: garage-remote +postgres-18-cluster: + mode: recovery + cluster: + image: + repository: ghcr.io/cloudnative-pg/postgresql + tag: 18.1-standard-trixie + storage: + storageClass: local-path + walStorage: + storageClass: local-path + monitoring: + enabled: true + prometheusRule: + enabled: true + recovery: + method: import + objectStore: + destinationPath: s3://postgres-backups/cl01tl/jellystat/jellystat-postgresql-18-cluster + endpointURL: http://garage-main.garage:3900 + index: 1 + endpointCredentials: jellystat-postgresql-18-cluster-backup-secret-garage + import: + type: "microservice" + databases: + - app + source: + host: "jellystat-postgresql-17-cluster-rw" + port: 5432 + username: app + database: app + sslMode: "disable" + passwordSecret: + name: "jellystat-postgresql-17-cluster-app" + key: "password" + backup: + objectStore: + - name: external + destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/jellystat/jellystat-postgresql-18-cluster + index: 1 + retentionPolicy: "30d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/jellystat/jellystat-postgresql-18-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: jellystat-postgresql-18-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "3d" + isWALArchiver: true + # - name: garage-remote + # destinationPath: s3://postgres-backups/cl01tl/jellystat/jellystat-postgresql-18-cluster + # index: 1 + # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 + # endpointCredentials: jellystat-postgresql-18-cluster-backup-secret-garage + # retentionPolicy: "30d" + # data: + # compression: bzip2 + # jobs: 2 + scheduledBackups: + - name: daily-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local + # - name: weekly-backup + # suspend: false + # immediate: true + # schedule: "0 6 4 * * SAT" + # backupName: garage-remote