Skip to content

Commit 864723a

Browse files
FANorth14
authored andcommitted
allow certificate isssuer to be optional, wire issuerName
Signed-off-by: FA <filip.andersson1@combitech.com> Signed-off-by: FA <filip@artifact.se>
1 parent 3c56d04 commit 864723a

6 files changed

Lines changed: 16 additions & 3 deletions

File tree

charts/plugin-barman-cloud/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud
2727
| affinity | object | `{}` | Affinity for the operator to be installed. |
2828
| certificate.createClientCertificate | bool | `true` | Specifies whether the client certificate should be created. |
2929
| certificate.createServerCertificate | bool | `true` | Specifies whether the server certificate should be created. |
30+
| certificate.createIssuer | bool | `true` | Specifies whether the issuer object should be created. |
3031
| certificate.duration | string | `"2160h"` | The duration of the certificates. |
3132
| certificate.issuerName | string | `"selfsigned-issuer"` | The name of the issuer to use for the certificates. |
3233
| certificate.renewBefore | string | `"360h"` | The renew before time for the certificates. |

charts/plugin-barman-cloud/templates/certificate-issuer.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
#
1717
# SPDX-License-Identifier: Apache-2.0
1818
#
19+
{{- if .Values.certificate.createIssuer }}
1920
---
2021
apiVersion: cert-manager.io/v1
2122
kind: Issuer
2223
metadata:
23-
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
24+
name: {{ include "plugin-barman-cloud.fullname" . }}-{{ .Values.certificate.issuerName }}
2425
namespace: {{ include "plugin-barman-cloud.namespace" . }}
2526
spec:
2627
selfSigned: {}
28+
{{- end }}

charts/plugin-barman-cloud/templates/client-certificate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
issuerRef:
3131
group: cert-manager.io
3232
kind: Issuer
33-
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
33+
name: {{ include "plugin-barman-cloud.fullname" . }}-{{ .Values.certificate.issuerName }}
3434
renewBefore: {{ .Values.certificate.renewBefore | default "360h" }}
3535
secretName: barman-cloud-client-tls
3636
usages:

charts/plugin-barman-cloud/templates/server-certificate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
issuerRef:
3333
group: cert-manager.io
3434
kind: Issuer
35-
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
35+
name: {{ include "plugin-barman-cloud.fullname" . }}-{{ .Values.certificate.issuerName }}
3636
renewBefore: {{ .Values.certificate.renewBefore | default "360h" }}
3737
secretName: barman-cloud-server-tls
3838
usages:

charts/plugin-barman-cloud/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
"title": "createServerCertificate",
4242
"type": "boolean"
4343
},
44+
"createIssuer": {
45+
"default": true,
46+
"description": "Specifies whether the issuer object should be created.",
47+
"required": [],
48+
"title": "createIssuer",
49+
"type": "boolean"
50+
},
4451
"duration": {
4552
"default": "2160h",
4653
"description": "The duration of the certificates.",
@@ -66,6 +73,7 @@
6673
"required": [
6774
"createClientCertificate",
6875
"createServerCertificate",
76+
"createIssuer",
6977
"issuerName",
7078
"duration",
7179
"renewBefore"

charts/plugin-barman-cloud/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ certificate:
189189
createClientCertificate: true
190190
# -- Specifies whether the server certificate should be created.
191191
createServerCertificate: true
192+
# -- Specifies whether the issuer should be created.
193+
createIssuer: true
192194
# -- The name of the issuer to use for the certificates.
193195
issuerName: selfsigned-issuer
194196
# -- The duration of the certificates.

0 commit comments

Comments
 (0)