Skip to content

Commit

Permalink
Merge pull request #71 from Schmoaaaaah/main
Browse files Browse the repository at this point in the history
fix: diffrent postgres versions in main container and backup Job
  • Loading branch information
JC5 authored Jun 30, 2024
2 parents 3064713 + 4b8c930 commit 6561d87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/firefly-db/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: firefly-db
version: 0.2.1
version: 0.2.2
description: Installs a postgres db for Firefly III
type: application
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/firefly-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ storage:
| configs.existingSecret | string | `""` | Set this to the name of a secret to load environment variables from. If defined, values in the secret will override values in configs |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"postgres"` | |
| image.tag | string | `"10-alpine"` | |
| image.tag | string | `"10-alpine"` | Should containe alpine if you use backup.destination "http" |
| storage.accessModes | string | `"ReadWriteOnce"` | |
| storage.class | string | `nil` | |
| storage.dataSize | string | `"1Gi"` | |
Expand Down
7 changes: 3 additions & 4 deletions charts/firefly-db/templates/backup.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
spec:
containers:
- name: {{ template "firefly-db.fullname" . }}-backup-job
image: alpine:3.13
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
Expand All @@ -12,13 +12,12 @@ spec:
- -c
- |
set -e
apk update
apk add curl
apk add postgresql
echo "creating backup file"
pg_dump -h $DBHOST -p $DBPORT -U $DBUSER --format=p --clean -d $DBNAME > /var/lib/backup/$DBNAME.sql
ls -la
{{- if eq .Values.backup.destination "http" }}
apk update
apk add curl
echo "uploading backup file"
curl -F "filename=@/var/lib/backup/${DBNAME}.sql" $BACKUP_URL
{{- end }}
Expand Down

0 comments on commit 6561d87

Please sign in to comment.