fix(cnpg): Migrate to barman cloud plugin
This commit is contained in:
@@ -18,21 +18,11 @@ spec:
|
|||||||
# the switchover of the primary
|
# the switchover of the primary
|
||||||
primaryUpdateStrategy: unsupervised
|
primaryUpdateStrategy: unsupervised
|
||||||
{{- if .Values.cluster.backup.enabled }}
|
{{- if .Values.cluster.backup.enabled }}
|
||||||
backup:
|
plugins:
|
||||||
barmanObjectStore:
|
- name: barman-cloud.cloudnative-pg.io
|
||||||
destinationPath: {{ .Values.cluster.destinationPath | default ""}}
|
isWALArchiver: true
|
||||||
serverName: {{ include "Atlantis.fullname" . }}-db
|
parameters:
|
||||||
endpointURL: http://10.255.241.30:30080
|
barmanObjectName: tos-store
|
||||||
s3Credentials:
|
|
||||||
accessKeyId:
|
|
||||||
key: access_key
|
|
||||||
name: cnpg-s3
|
|
||||||
secretAccessKey:
|
|
||||||
key: access_secret
|
|
||||||
name: cnpg-s3
|
|
||||||
wal:
|
|
||||||
compression: snappy
|
|
||||||
retentionPolicy: {{ .Values.cluster.backup.backupRetention | default "60d" }}
|
|
||||||
{{- end}}
|
{{- end}}
|
||||||
storage:
|
storage:
|
||||||
size: {{ .Values.cluster.size | default "5Gi" }}
|
size: {{ .Values.cluster.size | default "5Gi" }}
|
||||||
@@ -67,6 +57,44 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
---
|
---
|
||||||
|
{{- if .Values.cluster.backup.enabled -}}
|
||||||
|
apiVersion: barmancloud.cnpg.io/v1
|
||||||
|
kind: ObjectStore
|
||||||
|
metadata:
|
||||||
|
name: tos-store
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
spec:
|
||||||
|
retentionPolicy: {{ .Values.cluster.backup.backupRetention | default "60d" }}
|
||||||
|
configuration:
|
||||||
|
destinationPath: {{ .Values.cluster.destinationPath | default ""}}
|
||||||
|
serverName: {{ include "Atlantis.fullname" . }}-db
|
||||||
|
endpointURL: http://10.255.241.30:30080
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: cnpg-s3
|
||||||
|
key: access_key
|
||||||
|
secretAccessKey:
|
||||||
|
name: cnpg-s3
|
||||||
|
key: access_secret
|
||||||
|
wal:
|
||||||
|
compression: snappy
|
||||||
|
{{- end}}
|
||||||
|
---
|
||||||
|
{{- if and .Values.cluster.backup.enabled .Values.cluster.enabled -}}
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: ScheduledBackup
|
||||||
|
metadata:
|
||||||
|
name: {{ include "Atlantis.fullname" . }}-db
|
||||||
|
spec:
|
||||||
|
schedule: "0 0 1 * * *"
|
||||||
|
backupOwnerReference: self
|
||||||
|
cluster:
|
||||||
|
name: '{{ include "Atlantis.fullname" . }}-db'
|
||||||
|
method: plugin
|
||||||
|
pluginConfiguration:
|
||||||
|
name: barman-cloud.cloudnative-pg.io
|
||||||
|
{{- end }}
|
||||||
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: PodMonitor
|
kind: PodMonitor
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{{- if and .Values.cluster.backup.enabled .Values.cluster.enabled -}}
|
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
|
||||||
kind: ScheduledBackup
|
|
||||||
metadata:
|
|
||||||
name: {{ include "Atlantis.fullname" . }}-db
|
|
||||||
spec:
|
|
||||||
schedule: "0 0 1 * * *"
|
|
||||||
backupOwnerReference: self
|
|
||||||
cluster:
|
|
||||||
name: '{{ include "Atlantis.fullname" . }}-db'
|
|
||||||
{{- end }}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{{- if eq .Values.clusterConfig.cluster "oceanbox"}}
|
|
||||||
apiVersion: barmancloud.cnpg.io/v1
|
|
||||||
kind: ObjectStore
|
|
||||||
metadata:
|
|
||||||
name: tos-store
|
|
||||||
spec:
|
|
||||||
retentionPolicy: "30d"
|
|
||||||
configuration:
|
|
||||||
destinationPath: s3://cnpg
|
|
||||||
endpointURL: http://10.255.241.30:30080
|
|
||||||
s3Credentials:
|
|
||||||
accessKeyId:
|
|
||||||
name: cnpg-s3
|
|
||||||
key: access_key
|
|
||||||
secretAccessKey:
|
|
||||||
name: cnpg-s3
|
|
||||||
key: access_secret
|
|
||||||
wal:
|
|
||||||
compression: snappy
|
|
||||||
{{- end}}
|
|
||||||
Reference in New Issue
Block a user