Skip to content

Commit

Permalink
[certmanager] add subject to certrequest
Browse files Browse the repository at this point in the history
Allow setting the subject of a certificate via the certrequest.
  • Loading branch information
stuggi committed Apr 9, 2024
1 parent 357d8ff commit 818baf1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/certmanager/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 818baf1

Please sign in to comment.