File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -86,25 +86,35 @@ externalClusters:
8686 recoveryTarget:
8787 targetTime: { { . } }
8888 { {- end } }
89- { { with .Values.recovery.database } }
89+ { {- with .Values.recovery.database } }
9090 database: { { . } }
9191 { {- end } }
92- { { with .Values.recovery.owner } }
92+ { {- with .Values.recovery.owner } }
9393 owner: { { . } }
9494 { {- end } }
9595 { {- if eq .Values.recovery.method " backup" } }
9696 backup:
9797 name: { { .Values.recovery.backupName } }
98- { {- else if eq .Values.recovery.method " object_store" } }
98+ { {- else if and ( eq .Values.recovery.method " object_store" ) ( eq ( include " cluster.useBarmanCloudPlugin " .) " false " ) } }
9999 source: objectStoreRecoveryCluster
100100
101101externalClusters:
102102 - name: objectStoreRecoveryCluster
103103 barmanObjectStore:
104104 serverName: { { .Values.recovery.clusterName } }
105105 { {- $d := dict " chartFullname" (include " cluster.fullname" .) " scope" .Values.recovery " secretPrefix" " recovery" -} }
106- { {- include " cluster.barmanObjectStoreConfig" $d | nindent 4 } }
107- { {- end } }
106+ { {- include " cluster.barmanObjectStoreConfig" $d | indent 4 } }
107+ { {- else if and (eq .Values.recovery.method " object_store" ) (eq (include " cluster.useBarmanCloudPlugin" .) " true" ) } }
108+ source: origin
109+
110+ externalClusters:
111+ - name: origin
112+ plugin:
113+ name: barman-cloud.cloudnative-pg.io
114+ parameters:
115+ barmanObjectName: { { include " cluster.fullname" $ } }-object-store
116+ serverName: { { .Values.recovery.clusterName | default (include " cluster.fullname" .) } }
117+ { {- end } }
108118{ {- end } }
109119{ {- else } }
110120 { { fail " Invalid cluster mode!" } }
Original file line number Diff line number Diff line change 1- {{ if and ( eq (include "cluster.useBarmanCloudPlugin" .) "true") .Values.backups.enabled }}
1+ {{ if eq (include "cluster.useBarmanCloudPlugin" .) "true" }}
22apiVersion : barmancloud.cnpg.io/v1
33kind : ObjectStore
44metadata :
55 name : {{ include "cluster.fullname" $ }}-object-store
66spec :
77 configuration :
8+ {{- if and (eq .Values.mode "recovery") (eq .Values.recovery.method "object_store") -}}
9+ {{- $d := dict "chartFullname" (include "cluster.fullname" .) "scope" .Values.recovery "secretPrefix" "recovery" -}}
10+ {{- include "cluster.barmanObjectStoreConfig" $d | indent 2 }}
11+ {{- else }}
812 wal :
913 compression : {{ .Values.backups.wal.compression }}
1014 {{- if .Values.backups.wal.encryption }}
1721 encryption : {{ .Values.backups.data.encryption }}
1822 {{- end }}
1923 jobs : {{ .Values.backups.data.jobs }}
20- {{- $d := dict "chartFullname" (include "cluster.fullname" .) "scope" .Values.backups "secretPrefix" "backup" -}}
21- {{- include "cluster.barmanObjectStoreConfig" $d | indent 2 }}
24+ {{- $d := dict "chartFullname" (include "cluster.fullname" .) "scope" .Values.backups "secretPrefix" "backup" -}}
25+ {{- include "cluster.barmanObjectStoreConfig" $d | indent 2 }}
26+ {{- end }}
2227{{- end }}
You can’t perform that action at this time.
0 commit comments