|
@@ -1,6 +1,7 @@
|
|
{{- if .Values.ixChartContext.isUpgrade -}}
|
|
{{- if .Values.ixChartContext.isUpgrade -}}
|
|
{{ $values := (. | mustDeepCopy) }}
|
|
{{ $values := (. | mustDeepCopy) }}
|
|
{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
|
|
{{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
|
|
|
|
+{{ $dbHost := .Values.nextcloudDbHost }}
|
|
apiVersion: batch/v1
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
kind: Job
|
|
metadata:
|
|
metadata:
|
|
@@ -24,11 +25,16 @@ spec:
|
|
env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }}
|
|
env: {{ include "postgres.envVariableConfiguration" $values | nindent 10 }}
|
|
- name: BACKUP_NAME
|
|
- name: BACKUP_NAME
|
|
value: {{ template "postgres.backupName" . }}
|
|
value: {{ template "postgres.backupName" . }}
|
|
|
|
+ - name: POSTGRES_HOST
|
|
|
|
+ value: {{ $dbHost }}
|
|
volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }}
|
|
volumeMounts: {{ include "postgres.volumeMountsConfiguration" $values | nindent 10 }}
|
|
- name: backup-script-configmap
|
|
- name: backup-script-configmap
|
|
mountPath: /bin/backup_entrypoint.sh
|
|
mountPath: /bin/backup_entrypoint.sh
|
|
readOnly: true
|
|
readOnly: true
|
|
subPath: entrypoint.sh
|
|
subPath: entrypoint.sh
|
|
|
|
+ - name: nextcloud-data
|
|
|
|
+ mountPath: /nc-config
|
|
|
|
+ subPath: "config"
|
|
command:
|
|
command:
|
|
- "/bin/backup_entrypoint.sh"
|
|
- "/bin/backup_entrypoint.sh"
|
|
volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }}
|
|
volumes: {{ include "postgres.volumeConfiguration" $values | nindent 8 }}
|
|
@@ -36,4 +42,7 @@ spec:
|
|
configMap:
|
|
configMap:
|
|
defaultMode: 0700
|
|
defaultMode: 0700
|
|
name: "postgres-backup-hook-config-map"
|
|
name: "postgres-backup-hook-config-map"
|
|
|
|
+ {{ if .Values.appVolumeMounts }}
|
|
|
|
+ {{- include "common.storage.configureAppVolumes" .Values | nindent 8 }}
|
|
|
|
+ {{ end }}
|
|
{{- end -}}
|
|
{{- end -}}
|