mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2.schema.json
|
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
kind: HelmRelease
|
|
metadata:
|
|
name: &app cloudnative-pg-postgres16-pgdump
|
|
namespace: default
|
|
spec:
|
|
interval: 30m
|
|
chart:
|
|
spec:
|
|
chart: app-template
|
|
version: 3.5.1
|
|
sourceRef:
|
|
kind: HelmRepository
|
|
name: bjw-s
|
|
namespace: flux-system
|
|
maxHistory: 2
|
|
install:
|
|
createNamespace: true
|
|
remediation:
|
|
retries: 3
|
|
upgrade:
|
|
cleanupOnFail: true
|
|
remediation:
|
|
strategy: rollback
|
|
retries: 3
|
|
uninstall:
|
|
keepHistory: false
|
|
values:
|
|
controllers:
|
|
cloudnative-pg-postgres16-pgdump:
|
|
type: cronjob
|
|
cronjob:
|
|
concurrencyPolicy: Forbid
|
|
schedule: "@daily"
|
|
initContainers:
|
|
init-db:
|
|
image:
|
|
repository: ghcr.io/onedr0p/postgres-init
|
|
tag: 16
|
|
env:
|
|
EXCLUDE_DBS: app home_assistant lidarr_log radarr_log sonarr_log prowlarr_log postgres template0 template1
|
|
envFrom: &envFrom
|
|
- secretRef:
|
|
name: cloudnative-pg-postgres16-pgdump-secret
|
|
command: /scripts/list_dbs.sh
|
|
containers:
|
|
app:
|
|
image:
|
|
repository: prodrigestivill/postgres-backup-local
|
|
tag: 16-alpine@sha256:c773a909faea23b2a7d1b7f7c1a1cead1bb3d84f44255444c207311e21912ff1
|
|
command: [/backup.sh]
|
|
env:
|
|
POSTGRES_DB_FILE: /config/db_list
|
|
POSTGRES_EXTRA_OPTS: -Z9 --schema=public --blobs
|
|
BACKUP_KEEP_DAYS: "7"
|
|
BACKUP_KEEP_WEEKS: "4"
|
|
BACKUP_KEEP_MONTHS: "3"
|
|
HEALTHCHECK_PORT: "8080"
|
|
envFrom: *envFrom
|
|
service:
|
|
app:
|
|
controller: *app
|
|
enabled: false
|
|
persistence:
|
|
config:
|
|
enabled: true
|
|
type: emptyDir
|
|
globalMounts:
|
|
- path: /config
|
|
backups:
|
|
enabled: true
|
|
type: nfs
|
|
server: 192.168.9.10
|
|
path: /var/mnt/vol1/backups/postgresql
|
|
globalMounts:
|
|
- path: /backups
|
|
scripts:
|
|
enabled: true
|
|
type: configMap
|
|
name: cloudnative-pg-postgres16-pgdump-scripts # overriden by kustomizeconfig
|
|
defaultMode: 0775
|
|
globalMounts:
|
|
- path: /scripts
|