Charmed PostgreSQL K8s
- Canonical
- Databases
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 20 | 20 Sep 2022 | |
14/stable | 445 | Yesterday | |
14/stable | 444 | Yesterday | |
14/candidate | 382 | 09 Sep 2024 | |
14/candidate | 381 | 09 Sep 2024 | |
14/beta | 449 | Yesterday | |
14/beta | 448 | Yesterday | |
14/edge | 451 | Yesterday | |
14/edge | 450 | Yesterday |
juju deploy postgresql-k8s --channel 14/edge
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Note: All commands are written for juju >= v.3.0
If you are using an earlier version, check the Juju 3.0 Release Notes.
Manage backup retention
Charmed PostgreSQL K8s backups can be managed via a retention policy. This retention can be set by the user in the form of a configuration parameter in the charm s3-integrator
via the config option experimental-delete-older-than-days
.
This guide will teach you how to set this configuration and how it works in managing existing backups.
Note: This is an EXPERIMENTAL parameter, use it with caution.
Configure S3-integrator charm
If not done already, deploy and run the charm:
juju deploy s3-integrator
juju run s3-integrator/leader sync-s3-credentials access-key=<access-key-here> secret-key=<secret-key-here>
Then, use juju config
to add the desired retention time in days:
juju config s3-integrator experimental-delete-older-than-days=<number-of-days>
To pass these configurations to a Charmed PostgreSQL K8s application, integrate the two applications:
juju integrate s3-integrator postgresql-k8s
If at any moment it is desired to remove this option, the user can erase this configuration from the charm:
juju config s3-integrator --reset experimental-delete-older-than-days
Note: This configuration will be enforced in every Charmed PostgreSQL application related to the configured S3-integrator charm
Note: The retention is not enforced automatically once a backup is older than the set amount of days: Backups older than the set retention time will only get expired only once a newer backup is created.
This behavior avoids complete backup deletion if there has been no newer backups created in the charm.
The s3-integrator charm accepts many configurations - enter whichever are necessary for your S3 storage.