forked from cloudnative-pg/charts
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a3b817
commit 21ef4d7
Showing
13 changed files
with
133 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: minio-cleanup | ||
status: | ||
succeeded: 1 |
16 changes: 16 additions & 0 deletions
16
charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: minio-cleanup | ||
spec: | ||
template: | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: minio-cleanup | ||
image: minio/mc | ||
command: ['sh', '-c'] | ||
args: | ||
- | | ||
mc alias set myminio https://minio.minio.svc.cluster.local minio minio123 | ||
mc rm --recursive --force myminio/mybucket/scheduledbackups |
37 changes: 37 additions & 0 deletions
37
charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Cluster | ||
metadata: | ||
name: scheduledbackups-paradedb | ||
status: | ||
readyInstances: 1 | ||
--- | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: ScheduledBackup | ||
metadata: | ||
name: scheduledbackups-paradedb-daily-backup | ||
spec: | ||
immediate: true | ||
schedule: "0 0 0 * * *" | ||
method: barmanObjectStore | ||
backupOwnerReference: self | ||
cluster: | ||
name: scheduledbackups-paradedb | ||
--- | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: ScheduledBackup | ||
metadata: | ||
name: scheduledbackups-paradedb-weekly-backup | ||
spec: | ||
immediate: true | ||
schedule: "0 0 0 * * 1" | ||
method: barmanObjectStore | ||
backupOwnerReference: self | ||
cluster: | ||
name: scheduledbackups-paradedb | ||
--- | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Backup | ||
spec: | ||
method: barmanObjectStore | ||
cluster: | ||
name: scheduledbackups-paradedb |
37 changes: 37 additions & 0 deletions
37
charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
type: paradedb | ||
mode: standalone | ||
version: | ||
major: "17" | ||
paradedb: "0.15.1" | ||
cluster: | ||
instances: 1 | ||
storage: | ||
size: 256Mi | ||
|
||
backups: | ||
enabled: true | ||
provider: s3 | ||
endpointURL: "https://minio.minio.svc.cluster.local" | ||
endpointCA: | ||
name: kube-root-ca.crt | ||
key: ca.crt | ||
wal: | ||
encryption: "" | ||
data: | ||
encryption: "" | ||
s3: | ||
bucket: "mybucket" | ||
path: "/scheduledbackups/v1" | ||
accessKey: "minio" | ||
secretKey: "minio123" | ||
region: "local" | ||
retentionPolicy: "30d" | ||
scheduledBackups: | ||
- name: daily-backup | ||
schedule: "0 0 0 * * *" | ||
backupOwnerReference: self | ||
method: barmanObjectStore | ||
- name: weekly-backup | ||
schedule: "0 0 0 * * 1" | ||
backupOwnerReference: self | ||
method: barmanObjectStore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
name: scheduledbackups | ||
spec: | ||
timeouts: | ||
apply: 1s | ||
assert: 1m | ||
cleanup: 5m | ||
steps: | ||
- name: Install the ParadeDB cluster with ScheduledBackups | ||
try: | ||
- script: | ||
content: | | ||
helm upgrade \ | ||
--install \ | ||
--namespace $NAMESPACE \ | ||
--values ./01-scheduledbackups_cluster.yaml \ | ||
--wait \ | ||
scheduledbackups ../../ | ||
- assert: | ||
file: ./01-scheduledbackups_cluster-assert.yaml | ||
- name: Cleanup | ||
try: | ||
- script: | ||
content: | | ||
helm uninstall --namespace $NAMESPACE scheduledbackups |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters