From 818baf11313d066d012215b579a2244395902f1f Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Tue, 9 Apr 2024 14:31:02 +0200 Subject: [PATCH] [certmanager] add subject to certrequest Allow setting the subject of a certificate via the certrequest. --- modules/certmanager/certificate.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/certmanager/certificate.go b/modules/certmanager/certificate.go index 12b7b78d..dcffbae3 100644 --- a/modules/certmanager/certificate.go +++ b/modules/certmanager/certificate.go @@ -57,6 +57,7 @@ type CertificateRequest struct { Annotations map[string]string Labels map[string]string Usages []certmgrv1.KeyUsage + Subject *certmgrv1.X509Subject } // NewCertificate returns an initialized Certificate. @@ -201,7 +202,8 @@ func EnsureCert( Annotations: request.Annotations, Labels: request.Labels, }, - Usages: request.Usages, + Subject: request.Subject, + Usages: request.Usages, } if request.RenewBefore != nil {