Skip to content

Commit ed8c0ec

Browse files
Merge pull request #128 from OSGP/SMHE-2268-add-certificate
Add certificate template for Certmanager
2 parents 6110d4c + 217a62e commit ed8c0ec

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

charts/gxf/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: gxf
33
description: Generic GXF Helm chart
4-
version: '1.7.0'
4+
version: '1.8.0'
55
icon: https://artwork.lfenergy.org/projects/grid-exchange-fabric/abbrev/color/grid-exchange-fabric-abbrev-color.png
66
maintainers:
77
- name: OSGP

charts/gxf/templates/certificate.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{{- range .Values.certificates }}
2+
apiVersion: cert-manager.io/v1
3+
kind: Certificate
4+
metadata:
5+
name: {{ $.Release.Name }}-{{ .name }}
6+
spec:
7+
secretName: {{ $.Release.Name }}-{{ .name }}
8+
duration: {{ .duration | default "8760h0m0s" }}
9+
renewBefore: {{ .renewBefore | default "720h0m0s" }}
10+
commonName: {{ .commonName }}
11+
privateKey:
12+
algorithm: RSA
13+
size: 2048
14+
{{- if .dnsNames }}
15+
dnsNames:
16+
{{- range .dnsNames }}
17+
- {{ . }}
18+
{{- end }}
19+
{{- end }}
20+
issuerRef:
21+
name: {{ if $.issuerRefName }}{{ $.issuerRefName }}{{ else }}{{ printf "%s-ca-issuer" $.Release.Namespace }}{{ end }}
22+
kind: {{ if $.issuerRefKind }}{{ $.issuerRefKind }}{{ else }}Issuer{{ end }}
23+
usages:
24+
{{- if .usages }}
25+
{{- range .usages }}
26+
- {{ . }}
27+
{{- end }}
28+
{{- else }}
29+
- server auth
30+
- client auth
31+
{{- end }}
32+
keystores:
33+
pkcs12:
34+
create: true
35+
passwordSecretRef:
36+
name: keystore-password
37+
key: password
38+
---
39+
{{- end }}

charts/gxf/values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,13 @@ logging:
104104
# filename: your-own-choosing (defaults to .Release.Name)
105105
maxHistoryDays: 3
106106
totalSizeCap: 2GB
107+
108+
certificates: []
109+
# - name: example-client-tls-cert
110+
# commonName: example-client
111+
# usages:
112+
# - client auth
113+
# - name: example-server-tls-cert
114+
# commonName: example.com
115+
# dnsNames:
116+
# - example.com

0 commit comments

Comments
 (0)