Skip to content

Commit

Permalink
Merge pull request #75 from vicsufer/main
Browse files Browse the repository at this point in the history
Use environment variables from secret on database job.
  • Loading branch information
JC5 authored Dec 12, 2024
2 parents 866e742 + 5b3e9f1 commit 8ba7514
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 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.2
version: 0.2.3
description: Installs a postgres db for Firefly III
type: application
sources:
Expand Down
5 changes: 5 additions & 0 deletions charts/firefly-db/templates/backup.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: IfNotPresent
envFrom:
{{- if not .Values.configs.existingSecret }}
- configMapRef:
name: {{ template "firefly-db.fullname" . }}-config
{{- else }}
- secretRef:
name: {{ .Values.configs.existingSecret }}
{{- end }}
command:
- /bin/sh
- -c
Expand Down
4 changes: 3 additions & 1 deletion charts/firefly-db/templates/firefly-db-cm.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.configs.existingSecret }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -11,4 +12,5 @@ metadata:
data:
{{- range $key, $value := .Values.configs }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/firefly-db/templates/firefly-db-restore-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ spec:
image: alpine:3.13
imagePullPolicy: IfNotPresent
envFrom:
{{- if not .Values.configs.existingSecret }}
- configMapRef:
name: {{ template "firefly-db.fullname" . }}-config
{{- else }}
- secretRef:
name: {{ .Values.configs.existingSecret }}
{{- end }}
command:
- /bin/sh
- -c
Expand Down
2 changes: 1 addition & 1 deletion charts/firefly-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ storage:
dataSize: 1Gi
# -- Use an existing PersistentVolumeClaim, overrides values above
existingClaim: ""

backup:
# There are two possible backup destinations currently implemented, http and pvc
destination: http
Expand Down

0 comments on commit 8ba7514

Please sign in to comment.