-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcertificates.yaml
More file actions
53 lines (53 loc) · 1.74 KB
/
Copy pathcertificates.yaml
File metadata and controls
53 lines (53 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{{- if .Values.cnpg.tls.certManager.createClientCert }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "cnpg-plugin-wal-g.fullname" . }}-client
namespace: {{ .Release.Namespace }}
labels:
{{- include "cnpg-plugin-wal-g.labels" . | nindent 4 }}
spec:
secretName: {{ include "cnpg-plugin-wal-g.fullname" . }}-client-tls
commonName: cnpg-plugin-wal-g-client
duration: {{ .Values.cnpg.tls.certManager.certsDuration }}
renewBefore: {{ .Values.cnpg.tls.certManager.certsRenewBefore }}
isCA: false
usages:
- client auth
issuerRef:
{{- if .Values.cnpg.tls.certManager.createSelfSignedIssuer }}
name: {{ include "cnpg-plugin-wal-g.fullname" . }}-selfsigned
{{- else }}
name: {{ .Values.cnpg.tls.certManager.existingIssuerName }}
{{- end }}
kind: Issuer
group: cert-manager.io
---
{{- end }}
{{- if .Values.cnpg.tls.certManager.createServerCert }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "cnpg-plugin-wal-g.fullname" . }}-server
namespace: {{ .Release.Namespace }}
labels:
{{- include "cnpg-plugin-wal-g.labels" . | nindent 4 }}
spec:
secretName: {{ include "cnpg-plugin-wal-g.fullname" . }}-server-tls
commonName: cnpg-plugin-wal-g
dnsNames:
- {{ include "cnpg-plugin-wal-g.fullname" . }}
duration: {{ .Values.cnpg.tls.certManager.certsDuration }}
renewBefore: {{ .Values.cnpg.tls.certManager.certsRenewBefore }}
isCA: false
usages:
- server auth
issuerRef:
{{- if .Values.cnpg.tls.certManager.createSelfSignedIssuer }}
name: {{ include "cnpg-plugin-wal-g.fullname" . }}-selfsigned
{{- else }}
name: {{ .Values.cnpg.tls.certManager.existingIssuerName }}
{{- end }}
kind: Issuer
group: cert-manager.io
{{- end }}