Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chart/chart-index/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
repository: https://cloudnative-pg.github.io/charts
- name: plugin-barman-cloud
alias: cloudnative-pg-plugin-barman-cloud
version: 0.6.0
version: 0.7.1
repository: https://cloudnative-pg.github.io/charts
- name: cloud-firewall-crd
version: 0.2.0
Expand Down
4 changes: 2 additions & 2 deletions charts/cloudnative-pg-plugin-barman-cloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: v0.12.0
appVersion: v0.14.0
description: Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud
home: https://cloudnative-pg.io
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
Expand All @@ -24,4 +24,4 @@ name: plugin-barman-cloud
sources:
- https://github.com/cloudnative-pg/plugin-barman-cloud
type: application
version: 0.6.0
version: 0.7.1
98 changes: 88 additions & 10 deletions charts/cloudnative-pg-plugin-barman-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,75 @@
# plugin-barman-cloud

![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square)
![Version: 0.7.1](https://img.shields.io/badge/Version-0.7.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.14.0](https://img.shields.io/badge/AppVersion-v0.14.0-informational?style=flat-square)

Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud

**Homepage:** <https://cloudnative-pg.io>

## Maintainers
About this chart
----------------

| Name | Email | Url |
| ---- | ------ | --- |
| itay-grudev | <itay@verito.digital> | |
| quantumenigmaa | <thibaud.vaisseau@gmail.com> | |
| quentinbisson | <quentin.bisson@gmail.com> | |
Helm chart to install the [CNPG-I Barman Cloud Plugin](https://github.com/cloudnative-pg/plugin-barman-cloud),
the [CloudNativePG](https://cloudnative-pg.io) plugin that adds backup and restore capabilities to PostgreSQL
`Cluster` resources via [Barman Cloud](https://pgbarman.org/).

**NOTE**: this chart supports only the latest point release of the plugin.

**IMPORTANT**: this chart requires a working installation of [cert-manager](https://cert-manager.io/).
Please refer to the cert-manager
[installation page](https://cert-manager.io/docs/installation/helm/) for more information.

The chart deploys the plugin only. It does **not** install the CloudNativePG operator (use the companion
[`cloudnative-pg`](https://github.com/cloudnative-pg/charts/tree/main/charts/cloudnative-pg) chart for that),
and it does not create any `Cluster` resource. To provision a PostgreSQL cluster that uses this plugin, use
the [`cluster`](https://github.com/cloudnative-pg/charts/tree/main/charts/cluster) chart
(see the [Cluster chart README](https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/README.md) for details)
or apply your own `Cluster` manifest.

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

### Prerequisites

This chart requires [cert-manager](https://cert-manager.io/) to issue the plugin's TLS certificates.
Install it and wait until it is ready **before** installing this chart, otherwise the install fails because
the certificates cannot be issued.

### Add the chart repository

```console
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update
```

### Install the plugin

```console
helm upgrade --install plugin-barman-cloud \
--namespace cnpg-system \
cnpg/plugin-barman-cloud
```

See the [Values](#values) section below for the full list of configurable parameters.

### Verify the installation

```console
kubectl -n cnpg-system get deploy
kubectl -n cnpg-system rollout status deploy/plugin-barman-cloud
```

Uninstalling
------------

```console
helm uninstall plugin-barman-cloud --namespace cnpg-system
```

> **Warning**
> Uninstalling the chart does not remove the plugin's CRDs (for example `ObjectStore`). Deleting them removes
> every `ObjectStore` resource and the backup configuration it holds, so only delete the CRDs if you are sure
> no resource depends on them.

## Source Code

Expand All @@ -27,12 +84,13 @@ Kubernetes: `>=1.29.0-0`
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalArgs | list | `[]` | Additional arguments to be added to the operator's args list. |
| additionalEnv | list | `[]` | Array containing extra environment variables which can be templated. For example: - name: RELEASE_NAME value: "{{ .Release.Name }}" - name: MY_VAR value: "mySpecialKey" |
| additionalEnv | list | `[]` | Array containing extra environment variables which can be templated. |
| affinity | object | `{}` | Affinity for the operator to be installed. |
| certificate.createClientCertificate | bool | `true` | Specifies whether the client certificate should be created. |
| certificate.createIssuer | bool | `true` | Specifies whether the issuer should be created. |
| certificate.createServerCertificate | bool | `true` | Specifies whether the server certificate should be created. |
| certificate.duration | string | `"2160h"` | The duration of the certificates. |
| certificate.issuerName | string | `"selfsigned-issuer"` | The name of the issuer to use for the certificates. |
| certificate.issuerName | string | `""` | The name of the issuer to use for the certificates. |
| certificate.renewBefore | string | `"360h"` | The renew before time for the certificates. |
| commonAnnotations | object | `{}` | Annotations to be added to all other resources. |
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":10001,"runAsUser":10001,"seccompProfile":{"type":"RuntimeDefault"}}` | Container Security Context. |
Expand All @@ -52,6 +110,7 @@ Kubernetes: `>=1.29.0-0`
| podLabels | object | `{}` | Labels to be added to the pod. |
| podSecurityContext | object | `{"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Security Context for the whole pod. |
| priorityClassName | string | `""` | Priority indicates the importance of a Pod relative to other Pods. |
| rbac.cnpgGroup | string | `"postgresql.cnpg.io"` | The API group of the Cluster CRD the plugin is granted access to (get/list/watch on backups, update on clusters/finalizers). Override this if you run a CloudNativePG-based operator whose Cluster CRD lives under a different API group. |
| rbac.create | bool | `true` | Specifies whether Role and RoleBinding should be created. |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
Expand All @@ -66,4 +125,23 @@ Kubernetes: `>=1.29.0-0`
| sidecarImage.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| tolerations | list | `[]` | Tolerations for the operator to be installed. |
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for the operator to be installed. |
| updateStrategy | object | `{}` | Update strategy for the operator. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy For example: type: RollingUpdate rollingUpdate: maxSurge: 25% maxUnavailable: 25% WARNING: the RollingUpdate strategy is not supported by the operator yet so it can currently only use the Recreate strategy. |
| updateStrategy | object | `{}` | Update strategy for the operator. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy |

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| itay-grudev | <itay@verito.digital> | |
| quantumenigmaa | <thibaud.vaisseau@gmail.com> | |
| quentinbisson | <quentin.bisson@gmail.com> | |

Contributing
------------

Please read the [code of conduct](https://github.com/cloudnative-pg/charts/blob/main/CODE-OF-CONDUCT.md) and the
[guidelines](https://github.com/cloudnative-pg/charts/blob/main/CONTRIBUTING.md) to contribute to the project.

Copyright
---------

Helm charts for CloudNativePG are distributed under [Apache License 2.0](./LICENSE).
108 changes: 108 additions & 0 deletions charts/cloudnative-pg-plugin-barman-cloud/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{{ template "chart.header" . }}


{{ template "chart.deprecationWarning" . }}


{{ template "chart.badgesSection" . }}


{{ template "chart.description" . }}


{{ template "chart.homepageLine" . }}


About this chart
----------------

Helm chart to install the [CNPG-I Barman Cloud Plugin](https://github.com/cloudnative-pg/plugin-barman-cloud),
the [CloudNativePG](https://cloudnative-pg.io) plugin that adds backup and restore capabilities to PostgreSQL
`Cluster` resources via [Barman Cloud](https://pgbarman.org/).

**NOTE**: this chart supports only the latest point release of the plugin.

**IMPORTANT**: this chart requires a working installation of [cert-manager](https://cert-manager.io/).
Please refer to the cert-manager
[installation page](https://cert-manager.io/docs/installation/helm/) for more information.

The chart deploys the plugin only. It does **not** install the CloudNativePG operator (use the companion
[`cloudnative-pg`](https://github.com/cloudnative-pg/charts/tree/main/charts/cloudnative-pg) chart for that),
and it does not create any `Cluster` resource. To provision a PostgreSQL cluster that uses this plugin, use
the [`cluster`](https://github.com/cloudnative-pg/charts/tree/main/charts/cluster) chart
(see the [Cluster chart README](https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/README.md) for details)
or apply your own `Cluster` manifest.


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

### Prerequisites

This chart requires [cert-manager](https://cert-manager.io/) to issue the plugin's TLS certificates.
Install it and wait until it is ready **before** installing this chart, otherwise the install fails because
the certificates cannot be issued.

### Add the chart repository

```console
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update
```

### Install the plugin

```console
helm upgrade --install plugin-barman-cloud \
--namespace cnpg-system \
cnpg/plugin-barman-cloud
```

See the [Values](#values) section below for the full list of configurable parameters.

### Verify the installation

```console
kubectl -n cnpg-system get deploy
kubectl -n cnpg-system rollout status deploy/plugin-barman-cloud
```


Uninstalling
------------

```console
helm uninstall plugin-barman-cloud --namespace cnpg-system
```

> **Warning**
> Uninstalling the chart does not remove the plugin's CRDs (for example `ObjectStore`). Deleting them removes
> every `ObjectStore` resource and the backup configuration it holds, so only delete the CRDs if you are sure
> no resource depends on them.

{{ template "chart.sourcesSection" . }}


{{ template "chart.requirementsSection" . }}


{{ template "chart.valuesSection" . }}

{{ template "chart.maintainersSection" . }}

Contributing
------------

Please read the [code of conduct](https://github.com/cloudnative-pg/charts/blob/main/CODE-OF-CONDUCT.md) and the
[guidelines](https://github.com/cloudnative-pg/charts/blob/main/CONTRIBUTING.md) to contribute to the project.


Copyright
---------

Helm charts for CloudNativePG are distributed under [Apache License 2.0](./LICENSE).


{{- if not .SkipVersionFooter }}
{{ template "helm-docs.versionFooter" . }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create the name of the certificate issuer to use
*/}}
{{- define "plugin-barman-cloud.certificateIssuerName" -}}
{{- default (printf "%s-selfsigned-issuer" (include "plugin-barman-cloud.fullname" .)) .Values.certificate.issuerName }}
{{- end }}
Comment on lines +78 to +80
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#
# SPDX-License-Identifier: Apache-2.0
#
{{- if .Values.certificate.createIssuer }}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
name: {{ include "plugin-barman-cloud.certificateIssuerName" . }}
namespace: {{ include "plugin-barman-cloud.namespace" . }}
spec:
selfSigned: {}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
issuerRef:
group: cert-manager.io
kind: Issuer
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
name: {{ include "plugin-barman-cloud.certificateIssuerName" . }}
renewBefore: {{ .Values.certificate.renewBefore | default "360h" }}
secretName: barman-cloud-client-tls
usages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.20.1
controller-gen.kubebuilder.io/version: v0.21.0
helm.sh/resource-policy: keep
name: objectstores.barmancloud.cnpg.io
spec:
Expand Down Expand Up @@ -145,10 +145,11 @@ spec:
description: |-
Compress a backup file (a tar file per tablespace) while streaming it
to the object store. Available options are empty string (no
compression, default), `gzip`, `bzip2`, and `snappy`.
compression, default), `gzip`, `bzip2`, `lz4`, and `snappy`.
enum:
- bzip2
- gzip
- lz4
- snappy
type: string
encryption:
Expand Down Expand Up @@ -176,6 +177,25 @@ spec:
format: int32
minimum: 1
type: integer
restoreAdditionalCommandArgs:
description: |-
Additional arguments that can be appended to the 'barman-cloud-restore'
command-line invocation. These arguments provide flexibility to customize
the data restore process further, according to specific requirements or
configurations.

Example:
In a scenario where specialized restore options are required, such as setting
a specific read timeout or defining custom behavior, users can use this field
to specify additional command arguments.

Note:
It's essential to ensure that the provided arguments are valid and supported
by the 'barman-cloud-restore' command, to avoid potential errors or unintended
behavior during execution.
items:
type: string
type: array
type: object
destinationPath:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ spec:
initialDelaySeconds: 10
periodSeconds: 10
tcpSocket:
port: 9090
port: 8081
Comment on lines 78 to +81
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 10
tcpSocket:
port: 8081
Comment on lines +82 to +86
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ rules:
- patch
- update
- apiGroups:
- postgresql.cnpg.io
- {{ .Values.rbac.cnpgGroup }}
resources:
- backups
verbs:
- get
- list
- watch
- apiGroups:
- postgresql.cnpg.io
- {{ .Values.rbac.cnpgGroup }}
resources:
- clusters/finalizers
verbs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
issuerRef:
group: cert-manager.io
kind: Issuer
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
name: {{ include "plugin-barman-cloud.certificateIssuerName" . }}
renewBefore: {{ .Values.certificate.renewBefore | default "360h" }}
secretName: barman-cloud-server-tls
usages:
Expand Down
Loading
Loading