Skip to content

Commit 33e320b

Browse files
author
Pascal Iske (OE17-2)
committed
feat(plugin-barman-cloud): make actual use of issuer name from values
Fixes #702.
1 parent 8b9b076 commit 33e320b

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

charts/plugin-barman-cloud/templates/_helpers.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,10 @@ Create the name of the service account to use
7171
{{- default "default" .Values.serviceAccount.name }}
7272
{{- end }}
7373
{{- end }}
74+
75+
{{/*
76+
Create the name of the certificate issuer to use
77+
*/}}
78+
{{- define "plugin-barman-cloud.certificateIssuerName" -}}
79+
{{- default (printf "%s-selfsigned-issuer" (include "plugin-barman-cloud.fullname" .)) .Values.certificate.issuerName }}
80+
{{- end }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
apiVersion: cert-manager.io/v1
2121
kind: Issuer
2222
metadata:
23-
name: {{ include "plugin-barman-cloud.fullname" . }}-selfsigned-issuer
23+
name: {{ include "plugin-barman-cloud.certificateIssuerName" . }}
2424
namespace: {{ include "plugin-barman-cloud.namespace" . }}
2525
spec:
2626
selfSigned: {}

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.certificateIssuerName" . }}
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.certificateIssuerName" . }}
3636
renewBefore: {{ .Values.certificate.renewBefore | default "360h" }}
3737
secretName: barman-cloud-server-tls
3838
usages:

charts/plugin-barman-cloud/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ certificate:
190190
# -- Specifies whether the server certificate should be created.
191191
createServerCertificate: true
192192
# -- The name of the issuer to use for the certificates.
193-
issuerName: selfsigned-issuer
193+
issuerName: ''
194194
# -- The duration of the certificates.
195195
duration: 2160h
196196
# -- The renew before time for the certificates.

0 commit comments

Comments
 (0)