From aa24b21a92e13879fc454e4f647ccee8ff886bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20No=C3=ABl?= Date: Wed, 18 Dec 2024 13:34:14 -0500 Subject: [PATCH] Remove scheduled backups test --- .../00-minio_cleanup-assert.yaml | 6 --- .../scheduledbackups/00-minio_cleanup.yaml | 16 -------- .../01-scheduledbackups_cluster-assert.yaml | 37 ------------------- .../01-scheduledbackups_cluster.yaml | 35 ------------------ .../test/scheduledbackups/chainsaw-test.yaml | 27 -------------- 5 files changed, 121 deletions(-) delete mode 100644 charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml delete mode 100644 charts/paradedb/test/scheduledbackups/chainsaw-test.yaml diff --git a/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml b/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml deleted file mode 100644 index 9c0f3eb48..000000000 --- a/charts/paradedb/test/scheduledbackups/00-minio_cleanup-assert.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: minio-cleanup -status: - succeeded: 1 diff --git a/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml b/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml deleted file mode 100644 index 90151a964..000000000 --- a/charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml +++ /dev/null @@ -1,16 +0,0 @@ -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 diff --git a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml b/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml deleted file mode 100644 index a3af1a25b..000000000 --- a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster-assert.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: postgresql.cnpg.io/v1 -kind: Cluster -metadata: - name: scheduledbackups-cluster -status: - readyInstances: 1 ---- -apiVersion: postgresql.cnpg.io/v1 -kind: ScheduledBackup -metadata: - name: scheduledbackups-cluster-daily-backup -spec: - immediate: true - schedule: "0 0 0 * * *" - method: barmanObjectStore - backupOwnerReference: self - cluster: - name: scheduledbackups-cluster ---- -apiVersion: postgresql.cnpg.io/v1 -kind: ScheduledBackup -metadata: - name: scheduledbackups-cluster-weekly-backup -spec: - immediate: true - schedule: "0 0 0 * * 1" - method: barmanObjectStore - backupOwnerReference: self - cluster: - name: scheduledbackups-cluster ---- -apiVersion: postgresql.cnpg.io/v1 -kind: Backup -spec: - method: barmanObjectStore - cluster: - name: scheduledbackups-cluster diff --git a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml b/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml deleted file mode 100644 index 94f6015c4..000000000 --- a/charts/paradedb/test/scheduledbackups/01-scheduledbackups_cluster.yaml +++ /dev/null @@ -1,35 +0,0 @@ -type: postgresql -mode: standalone - -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 diff --git a/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml b/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml deleted file mode 100644 index ce73d7233..000000000 --- a/charts/paradedb/test/scheduledbackups/chainsaw-test.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: chainsaw.kyverno.io/v1alpha1 -kind: Test -metadata: - name: scheduledbackups -spec: - timeouts: - apply: 1s - assert: 1m - cleanup: 2m - steps: - - name: Install a 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