Extend Postgres manifest with new params

This commit is contained in:
Sergey Dudoladov
2019-01-08 12:56:55 +01:00
parent f7058c754d
commit ad397045f7
4 changed files with 34 additions and 0 deletions
+10
View File
@@ -14,6 +14,8 @@ measurements. Please, refer to the [Kubernetes
documentation](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)
for the possible values of those.
:exclamation: If both operator configmap/CRD and a Postgres cluster manifest define the same parameter, the value from the Postgres cluster manifest is applied.
## Manifest structure
A postgres manifest is a `YAML` document. On the top level both individual
@@ -254,3 +256,11 @@ defined in the sidecar dictionary:
a dictionary of environment variables. Use usual Kubernetes definition
(https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)
for environment variables. Optional.
### Logical backup
Those parameters are defined under the `logical_backup` key:
* **enable_logical_backup**
determines if the logical backup of this cluster should be uploaded to S3. Default: false.
* **logical_backup_schedule**
backup schedule in Cron format. Default: "30 00 * * *"
+9
View File
@@ -308,3 +308,12 @@ every 6 hours.
Note that if the statefulset is scaled down before resizing the size changes
are only applied to the volumes attached to the running pods. The size of the
volumes that correspond to the previously running pods is not changed.
## Logical backups
If you add
```
logical_backup:
enable_logical_backup: true
```
to the cluster manifest, the operator will start a k8s cron job that will periodically execute `pg_dumpall` on the target PG cluster and upload results to an S3 bucket. Note that due to the [limitation of Kubernetes cron jobs](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#cron-job-limitations) it is highly advisable to set up additional monitoring for this feature; such monitoring is outside of the scope of operator responsibilities. See configuration reference for details.