Skip to content

Commit

Permalink
add this
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemnoel committed Sep 10, 2024
1 parent 7266815 commit d37c0f1
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 1 deletion.
149 changes: 149 additions & 0 deletions charts/cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{{ template "chart.header" . }}


{{ template "chart.deprecationWarning" . }}


{{ template "chart.badgesSection" . }}


> **Warning**
> ### This chart is under active development.
> ### Advised caution when using in production!


A note on the chart's purpose
-----------------------------

This is an opinionated chart that is designed to provide a subset of simple, stable and safe configurations using the
CloudNativePG operator. It is designed to provide a simple way to perform recovery operations to decrease your RTO.

It is not designed to be a one size fits all solution. If you need a more complicated setup we strongly recommend that
you either:

* use the operator directly
* create your own chart
* use Kustomize to modify the chart's resources

**_Note_** that the latter option carries it's own risks as the chart configuration may change, especially before it
reaches a stable release.

That being said, we welcome PRs that improve the chart, but please keep in mind that we don't plan to support every
single configuration that the operator provides and we may reject PRs that add too much complexity and maintenance
difficulty to the chart.


Getting Started
---------------

### Installing the Operator
Skip this step if the CNPG operator is already installed in your cluster.

```console
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm upgrade --install cnpg \
--namespace cnpg-system \
--create-namespace \
cnpg/cloudnative-pg
```

### Setting up a CNPG Cluster

```console
helm repo add paradedb https://paradedb.github.io/charts
helm upgrade --install paradedb \
--namespace paradedb-database \
--create-namespace \
--values values.yaml \
paradedb/cluster
```

A more detailed guide can be found in the [Getting Started docs](<./docs/Getting Started.md>).


Cluster Configuration
---------------------

### Database types

Currently the chart supports two database types. These are configured via the `type` parameter. These are:
* `postgresql` - A standard PostgreSQL database.
* `postgis` - A PostgreSQL database with the PostGIS extension installed.
* `timescaledb` - A PostgreSQL database with the TimescaleDB extension installed.
* `paradedb` - A PostgreSQL database with the ParadeDB extensions (`pg_search` and `pg_analytics`) installed.

Depending on the type the chart will use a different Docker image and fill in some initial setup, like extension installation.

### Modes of operation

The chart has three modes of operation. These are configured via the `mode` parameter:
* `standalone` - Creates new or updates an existing CNPG cluster. This is the default mode.
* `replica` - Creates a replica cluster from an existing CNPG cluster. **_Note_ that this mode is not yet supported.**
* `recovery` - Recovers a CNPG cluster from a backup, object store or via pg_basebackup.

### Backup configuration

CNPG implements disaster recovery via [Barman](https://pgbarman.org/). The following section configures the barman object
store where backups will be stored. Barman performs backups of the cluster filesystem base backup and WALs. Both are
stored in the specified location. The backup provider is configured via the `backups.provider` parameter. The following
providers are supported:

* S3 or S3-compatible stores, like MinIO
* Microsoft Azure Blob Storage
* Google Cloud Storage

Additionally you can specify the following parameters:
* `backups.retentionPolicy` - The retention policy for backups. Defaults to `30d`.
* `backups.scheduledBackups` - An array of scheduled backups containing a name and a crontab schedule. Example:
```yaml
backups:
scheduledBackups:
- name: daily-backup
schedule: "0 0 0 * * *" # Daily at midnight
backupOwnerReference: self
```

Each backup adapter takes it's own set of parameters, listed in the [Configuration options](#Configuration-options) section
below. Refer to the table for the full list of parameters and place the configuration under the appropriate key: `backup.s3`,
`backup.azure`, or `backup.google`.


Recovery
--------

There is a separate document outlining the recovery procedure here: **[Recovery](docs/recovery.md)**


Examples
--------

There are several configuration examples in the [examples](examples) directory. Refer to them for a basic setup and
refer to the [CloudNativePG Documentation](https://cloudnative-pg.io/documentation/current/) for more advanced configurations.


{{ template "chart.requirementsSection" . }}


{{ template "chart.valuesSection" . }}


{{ template "chart.maintainersSection" . }}


Features that require feedback
------------------------------

Please raise a ticket tested any of the following features and they have worked.
Alternatively a ticket and a PR if you have found that something needs a change to work properly.

- [ ] Google Cloud Storage Backups
- [ ] Google Cloud Storage Recovery


TODO
----
* IAM Role for S3 Service Account
* Automatic provisioning of a Alert Manager configuration


{{ template "helm-docs.versionFooter" . }}
2 changes: 1 addition & 1 deletion charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fullnameOverride: ""
###
# -- Type of the CNPG database. Available types:
# * `paradedb`
type: postgresql
type: cluster

version:
# -- PostgreSQL major version to use
Expand Down

0 comments on commit d37c0f1

Please sign in to comment.