diff --git a/charts/plugin-barman-cloud/README.md b/charts/plugin-barman-cloud/README.md index 0d088f2891..744857e935 100644 --- a/charts/plugin-barman-cloud/README.md +++ b/charts/plugin-barman-cloud/README.md @@ -30,6 +30,7 @@ Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud | 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.renewBefore | string | `"360h"` | The renew before time for the certificates. | +| certificate.revisionHistoryLimit | int | `1` | The maximum number of CertificateRequests to retain for each certificate. | | 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. | | crds.create | bool | `true` | Specifies whether the CRDs should be created when installing the chart. | diff --git a/charts/plugin-barman-cloud/templates/client-certificate.yaml b/charts/plugin-barman-cloud/templates/client-certificate.yaml index 5f4aeafe76..103b6d89a3 100644 --- a/charts/plugin-barman-cloud/templates/client-certificate.yaml +++ b/charts/plugin-barman-cloud/templates/client-certificate.yaml @@ -32,6 +32,9 @@ spec: kind: Issuer name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer renewBefore: {{ .Values.certificate.renewBefore | default "360h" }} + {{- with .Values.certificate.revisionHistoryLimit }} + revisionHistoryLimit: {{ . }} + {{- end }} secretName: barman-cloud-client-tls usages: - client auth diff --git a/charts/plugin-barman-cloud/templates/server-certificate.yaml b/charts/plugin-barman-cloud/templates/server-certificate.yaml index e82eaa34ba..d7f01c852f 100644 --- a/charts/plugin-barman-cloud/templates/server-certificate.yaml +++ b/charts/plugin-barman-cloud/templates/server-certificate.yaml @@ -34,6 +34,9 @@ spec: kind: Issuer name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer renewBefore: {{ .Values.certificate.renewBefore | default "360h" }} + {{- with .Values.certificate.revisionHistoryLimit }} + revisionHistoryLimit: {{ . }} + {{- end }} secretName: barman-cloud-server-tls usages: - server auth diff --git a/charts/plugin-barman-cloud/values.schema.json b/charts/plugin-barman-cloud/values.schema.json index 112c01ae19..b17c323969 100644 --- a/charts/plugin-barman-cloud/values.schema.json +++ b/charts/plugin-barman-cloud/values.schema.json @@ -61,6 +61,13 @@ "required": [], "title": "renewBefore", "type": "string" + }, + "revisionHistoryLimit": { + "default": 1, + "description": "The maximum number of CertificateRequests to retain for each certificate.", + "required": [], + "title": "revisionHistoryLimit", + "type": "integer" } }, "required": [ @@ -68,7 +75,8 @@ "createServerCertificate", "issuerName", "duration", - "renewBefore" + "renewBefore", + "revisionHistoryLimit" ], "title": "certificate", "type": "object" diff --git a/charts/plugin-barman-cloud/values.yaml b/charts/plugin-barman-cloud/values.yaml index ea37056316..62998ae7e3 100644 --- a/charts/plugin-barman-cloud/values.yaml +++ b/charts/plugin-barman-cloud/values.yaml @@ -195,3 +195,5 @@ certificate: duration: 2160h # -- The renew before time for the certificates. renewBefore: 360h + # -- The maximum number of CertificateRequests to retain for each certificate. + revisionHistoryLimit: 1