Skip to content

Commit 9bf77a1

Browse files
committed
docs: version 0.4.0
Signed-off-by: Marco Nenciarini <[email protected]>
1 parent 99f31a1 commit 9bf77a1

File tree

9 files changed

+9697
-0
lines changed

9 files changed

+9697
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# Features
6+
7+
This plugin enables continuous backup to object storage for a PostgreSQL
8+
cluster using the [barman-cloud](https://pgbarman.org/) tool suite.
9+
10+
The features provided by this plugin are:
11+
12+
- Data Directory Backup
13+
- Data Directory Restore
14+
- WAL Archiving
15+
- WAL Restoring
16+
- Point-in-Time Recovery (PITR)
17+
- Replica Clusters
18+
19+
This plugin is compatible with all object storage services supported by
20+
barman-cloud, including:
21+
22+
- Amazon AWS S3
23+
- Google Cloud Storage
24+
- Microsoft Azure Blob Storage
25+
26+
The following storage solutions have been tested and confirmed to work with
27+
this implementation:
28+
29+
- [MinIO](https://min.io/) – An S3-compatible object storage solution.
30+
- [Azurite](https://github.com/Azure/Azurite) – A simulator for Microsoft Azure Blob Storage.
31+
- [fake-gcs-server](https://github.com/fsouza/fake-gcs-server) – A simulator for Google Cloud Storage.
32+
33+
Backups created with in-tree object store support can be restored using this
34+
plugin, ensuring compatibility and reliability across environments.
35+
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# Installation
6+
7+
**IMPORTANT NOTES:**
8+
9+
1. The plugin **must** be installed in the same namespace where the operator is
10+
installed (typically `cnpg-system`).
11+
12+
2. Be aware that the operator's **listening namespaces** may differ from its
13+
installation namespace. Ensure you verify this distinction to avoid
14+
configuration issues.
15+
16+
Here’s an enhanced version of your instructions for verifying the prerequisites:
17+
18+
## Step 1 - Verify the Prerequisites
19+
20+
If CloudNativePG is installed in the default `cnpg-system` namespace, verify its version using the following command:
21+
22+
```sh
23+
kubectl get deployment -n cnpg-system cnpg-controller-manager -o yaml \
24+
| grep ghcr.io/cloudnative-pg/cloudnative-pg
25+
```
26+
27+
Example output:
28+
29+
```output
30+
image: ghcr.io/cloudnative-pg/cloudnative-pg:1.26.0
31+
```
32+
33+
Ensure that the version displayed is **1.26** or newer.
34+
35+
Then, use the [cmctl](https://cert-manager.io/docs/reference/cmctl/#installation)
36+
tool to confirm that `cert-manager` is correctly installed:
37+
38+
```sh
39+
cmctl check api
40+
```
41+
42+
Example output:
43+
44+
```output
45+
The cert-manager API is ready
46+
```
47+
48+
Both checks are necessary to proceed with the installation.
49+
50+
## Step 2 - Install the barman-cloud Plugin
51+
52+
Use `kubectl` to apply the manifest for the latest commit in the `main` branch:
53+
54+
<!-- x-release-please-start-version -->
55+
```sh
56+
kubectl apply -f \
57+
https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.3.0/manifest.yaml
58+
```
59+
<!-- x-release-please-end -->
60+
61+
Example output:
62+
63+
```output
64+
customresourcedefinition.apiextensions.k8s.io/objectstores.barmancloud.cnpg.io created
65+
serviceaccount/plugin-barman-cloud created
66+
role.rbac.authorization.k8s.io/leader-election-role created
67+
clusterrole.rbac.authorization.k8s.io/metrics-auth-role created
68+
clusterrole.rbac.authorization.k8s.io/metrics-reader created
69+
clusterrole.rbac.authorization.k8s.io/objectstore-editor-role created
70+
clusterrole.rbac.authorization.k8s.io/objectstore-viewer-role created
71+
clusterrole.rbac.authorization.k8s.io/plugin-barman-cloud created
72+
rolebinding.rbac.authorization.k8s.io/leader-election-rolebinding created
73+
clusterrolebinding.rbac.authorization.k8s.io/metrics-auth-rolebinding created
74+
clusterrolebinding.rbac.authorization.k8s.io/plugin-barman-cloud-binding created
75+
secret/plugin-barman-cloud-8tfddg42gf created
76+
service/barman-cloud created
77+
deployment.apps/barman-cloud configured
78+
certificate.cert-manager.io/barman-cloud-client created
79+
certificate.cert-manager.io/barman-cloud-server created
80+
issuer.cert-manager.io/selfsigned-issuer created
81+
```
82+
83+
After these steps, the plugin will be successfully installed. Make sure it is
84+
ready to use by checking the deployment status as follows:
85+
86+
```sh
87+
kubectl rollout status deployment \
88+
-n cnpg-system barman-cloud
89+
```
90+
91+
Example output:
92+
93+
```output
94+
deployment "barman-cloud" successfully rolled out
95+
```
96+
97+
This confirms that the plugin is deployed and operational.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# API Reference
2+
3+
## Packages
4+
- [barmancloud.cnpg.io/v1](#barmancloudcnpgiov1)
5+
6+
7+
## barmancloud.cnpg.io/v1
8+
9+
Package v1 contains API Schema definitions for the barmancloud v1 API group
10+
11+
### Resource Types
12+
- [ObjectStore](#objectstore)
13+
14+
15+
16+
#### InstanceSidecarConfiguration
17+
18+
19+
20+
InstanceSidecarConfiguration defines the configuration for the sidecar that runs in the instance pods.
21+
22+
23+
24+
_Appears in:_
25+
- [ObjectStoreSpec](#objectstorespec)
26+
27+
| Field | Description | Required | Default | Validation |
28+
| --- | --- | --- | --- | --- |
29+
| `env` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#envvar-v1-core) array_ | The environment to be explicitly passed to the sidecar | | | |
30+
| `retentionPolicyIntervalSeconds` _integer_ | The retentionCheckInterval defines the frequency at which the<br />system checks and enforces retention policies. | | 1800 | |
31+
32+
33+
#### ObjectStore
34+
35+
36+
37+
ObjectStore is the Schema for the objectstores API.
38+
39+
40+
41+
42+
43+
| Field | Description | Required | Default | Validation |
44+
| --- | --- | --- | --- | --- |
45+
| `apiVersion` _string_ | `barmancloud.cnpg.io/v1` | True | | |
46+
| `kind` _string_ | `ObjectStore` | True | | |
47+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | True | | |
48+
| `spec` _[ObjectStoreSpec](#objectstorespec)_ | Specification of the desired behavior of the ObjectStore.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status | True | | |
49+
| `status` _[ObjectStoreStatus](#objectstorestatus)_ | Most recently observed status of the ObjectStore. This data may not be up to<br />date. Populated by the system. Read-only.<br />More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status | | | |
50+
51+
52+
#### ObjectStoreSpec
53+
54+
55+
56+
ObjectStoreSpec defines the desired state of ObjectStore.
57+
58+
59+
60+
_Appears in:_
61+
- [ObjectStore](#objectstore)
62+
63+
| Field | Description | Required | Default | Validation |
64+
| --- | --- | --- | --- | --- |
65+
| `configuration` _[BarmanObjectStoreConfiguration](https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api#BarmanObjectStoreConfiguration)_ | The configuration for the barman-cloud tool suite | True | | |
66+
| `retentionPolicy` _string_ | RetentionPolicy is the retention policy to be used for backups<br />and WALs (i.e. '60d'). The retention policy is expressed in the form<br />of `XXu` where `XX` is a positive integer and `u` is in `[dwm]` -<br />days, weeks, months. | | | Pattern: `^[1-9][0-9]*[dwm]$` <br /> |
67+
| `instanceSidecarConfiguration` _[InstanceSidecarConfiguration](#instancesidecarconfiguration)_ | The configuration for the sidecar that runs in the instance pods | | | |
68+
69+
70+
#### ObjectStoreStatus
71+
72+
73+
74+
ObjectStoreStatus defines the observed state of ObjectStore.
75+
76+
77+
78+
_Appears in:_
79+
- [ObjectStore](#objectstore)
80+
81+
| Field | Description | Required | Default | Validation |
82+
| --- | --- | --- | --- | --- |
83+
| `serverRecoveryWindow` _object (keys:string, values:[RecoveryWindow](#recoverywindow))_ | ServerRecoveryWindow maps each server to its recovery window | True | | |
84+
85+
86+
#### RecoveryWindow
87+
88+
89+
90+
RecoveryWindow represents the time span between the first
91+
recoverability point and the last successful backup of a PostgreSQL
92+
server, defining the period during which data can be restored.
93+
94+
95+
96+
_Appears in:_
97+
- [ObjectStoreStatus](#objectstorestatus)
98+
99+
| Field | Description | Required | Default | Validation |
100+
| --- | --- | --- | --- | --- |
101+
| `firstRecoverabilityPoint` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#time-v1-meta)_ | The first recoverability point in a PostgreSQL server refers to<br />the earliest point in time to which the database can be<br />restored. | True | | |
102+
| `lastSuccussfulBackupTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.32/#time-v1-meta)_ | The last successful backup time | True | | |
103+
104+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# Prerequisites
6+
7+
To use this plugin, ensure the following prerequisites are met:
8+
9+
- [**CloudNativePG**](https://cloudnative-pg.io) version **1.25** or newer.
10+
- [**cert-manager**](https://cert-manager.io/) for enabling **TLS communication** between the plugin and the operator.

0 commit comments

Comments
 (0)