-
Notifications
You must be signed in to change notification settings - Fork 0
/
certificate.yaml.j2
22 lines (21 loc) · 1.05 KB
/
certificate.yaml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ certificate.commonName | replace('.','-') | replace('@','-') }}
namespace: {{ certificate.namespace }}
spec:
secretName: ingress-{{ certificate.commonName | replace('.','-') | replace('@','-') }}
duration: {{ certificate.duration }}
issuerRef:
name: {%- if certificate.profile == 'external-domain-server-cert' %} ingressRoute.profile.externalDomain.serverCert.certIssuerName
{%- elif certificate.profile == 'external-domain-client-cert' %} ingressRoute.profile.externalDomain.clientCert.certIssuerName
{%- elif certificate.profile == 'internal-domain-server-cert' %} ingressRoute.profile.internalDomain.serverCert.certIssuerName
{%- elif certificate.profile == 'internal-domain-client-cert' %} ingressRoute.profile.internalDomain.clientCert.certIssuerName
{%- endif %}
kind: ClusterIssuer
commonName: {{ certificate.commonName }}
dnsNames:
- {{ certificate.commonName }}
privateKey:
algorithm: RSA
size: {{ certificate.keysize }}