Skip to content

Commit

Permalink
feat: ✨ handle cnpg backup compression in console chart
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Sep 25, 2024
1 parent e22fea0 commit 61db05c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/dso-console/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cpn-console
description: A Helm chart to deploy Cloud Pi Native Console
type: application
version: 1.8.16
version: 1.9.0
appVersion: 8.12.3
keywords: []
home: https://cloud-pi-native.fr
Expand Down
3 changes: 2 additions & 1 deletion charts/dso-console/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cpn-console

![Version: 1.8.16](https://img.shields.io/badge/Version-1.8.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.12.3](https://img.shields.io/badge/AppVersion-8.12.3-informational?style=flat-square)
![Version: 1.9.0](https://img.shields.io/badge/Version-1.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 8.12.3](https://img.shields.io/badge/AppVersion-8.12.3-informational?style=flat-square)

A Helm chart to deploy Cloud Pi Native Console

Expand Down Expand Up @@ -84,6 +84,7 @@ A Helm chart to deploy Cloud Pi Native Console
| client.tolerations | list | `[]` | Default tolerations for Console CPN client. |
| cnpg-operator.enabled | bool | `false` | Whether or not cnpg operator should be deployed. |
| cnpg.annotations | object | `{}` | Additional cnpg cluster annotations. |
| cnpg.backup.compression | string | `""` | Which compression algorithm should be used for cnpg backups (should be one of "gzip", "bzip2" or "snappy"). |
| cnpg.backup.cron | string | `"0 0 */6 * * *"` | The cron rule used for cnpg backups. By default it runs every 6 hours. |
| cnpg.backup.destinationPath | string | `""` | S3 destination path for cnpg backups (it should be set like `s3://<bucket_name>/<path>`). |
| cnpg.backup.enabled | bool | `false` | Whether or not cnpg cluster deployment should be enabled. |
Expand Down
6 changes: 6 additions & 0 deletions charts/dso-console/templates/cnpg/pg-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ spec:
secretAccessKey:
name: {{ .Values.cnpg.backup.s3Credentials.secretName | default (printf "%s-%s" "pg-cluster" (include "cpnConsole.fullname" .)) }}
key: {{ .Values.cnpg.backup.s3Credentials.secretAccessKey.key }}
{{- if .Values.cnpg.backup.compression }}
data:
compression: {{ .Values.cnpg.backup.compression }}
wal:
compression: {{ .Values.cnpg.backup.compression }}
{{- end }}
retentionPolicy: {{ .Values.cnpg.backup.retentionPolicy }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/dso-console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ cnpg:
# -- S3 secretAccessKey value used for cnpg backups.
# Only needed if `backup.s3Credentials.create` is set to `true`.
value: ""
# -- Which compression algorithm should be used for cnpg backups (should be one of "gzip", "bzip2" or "snappy").
compression: ""
# -- The cron rule used for cnpg backups. By default it runs every 6 hours.
cron: "0 0 */6 * * *"
# -- Retention policy for cnpg backups recurrences.
Expand Down

0 comments on commit 61db05c

Please sign in to comment.