Skip to content

Commit

Permalink
chore: Upgrade to 0.15.0 (#80)
Browse files Browse the repository at this point in the history
chore: Upgrade to 0.15.1 (#81)

feat: Add ScheduledBackups Test (#82)
  • Loading branch information
philippemnoel committed Feb 6, 2025
1 parent 8a3b817 commit 21ef4d7
Show file tree
Hide file tree
Showing 13 changed files with 133 additions and 10 deletions.
4 changes: 2 additions & 2 deletions charts/paradedb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ icon: https://raw.githubusercontent.com/paradedb/paradedb/main/docs/logo/light.s
type: application

# The Chart version, set in the publish CI workflow from GitHub Actions Variables
# We default to v0.14.1 for testing and local development
version: 0.14.1
# We default to v0.15.1 for testing and local development
version: 0.15.1

sources:
- https://github.com/paradedb/charts
Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentat
| recovery.secret.create | bool | `true` | Whether to create a secret for the backup credentials |
| recovery.secret.name | string | `""` | Name of the backup credentials secret |
| type | string | `"paradedb"` | Type of the CNPG database. Available types: * `paradedb` * `paradedb-enterprise` |
| version.paradedb | string | `"0.14.1"` | We default to v0.14.1 for testing and local development |
| version.paradedb | string | `"0.15.1"` | We default to v0.15.1 for testing and local development |
| version.postgresql | string | `"17"` | PostgreSQL major version to use |
| poolers[].name | string | `` | Name of the pooler resource |
| poolers[].instances | number | `1` | The number of replicas we want |
Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/examples/image-catalog-ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: postgresql
mode: standalone
version:
major: "17"
paradedb: "0.14.1"
paradedb: "0.15.1"
cluster:
instances: 1
imageCatalogRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/examples/image-catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: postgresql
mode: standalone
version:
major: "17"
paradedb: "0.14.1"
paradedb: "0.15.1"
cluster:
instances: 1
backups:
Expand Down
2 changes: 1 addition & 1 deletion charts/paradedb/examples/paradedb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: paradedb
mode: standalone
version:
postgresql: "17"
paradedb: "0.14.1"
paradedb: "0.15.1"
cluster:
instances: 1
backups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: paradedb-enterprise
mode: standalone
version:
major: "17"
paradedb: "0.14.1"
paradedb: "0.15.1"
cluster:
instances: 2
storage:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type: paradedb
mode: standalone
version:
major: "17"
paradedb: "0.14.1"
paradedb: "0.15.1"
cluster:
instances: 2
storage:
Expand Down
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 charts/paradedb/test/scheduledbackups/00-minio_cleanup.yaml
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
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
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
27 changes: 27 additions & 0 deletions charts/paradedb/test/scheduledbackups/chainsaw-test.yaml
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
4 changes: 2 additions & 2 deletions charts/paradedb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ version:
# -- PostgreSQL major version to use
postgresql: "17"
# -- The ParadeDB version, set in the publish CI workflow from the latest paradedb/paradedb GitHub tag
# -- We default to v0.14.1 for testing and local development
paradedb: "0.14.1"
# -- We default to v0.15.1 for testing and local development
paradedb: "0.15.1"

###
# -- Cluster mode of operation. Available modes:
Expand Down

0 comments on commit 21ef4d7

Please sign in to comment.