Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#817 from fmount/direct_tls
Browse files Browse the repository at this point in the history
Additional SubjectName in the CertificateRequest
  • Loading branch information
openshift-merge-bot[bot] authored Jun 11, 2024
2 parents 5de8b1b + 57d3317 commit 6fe60e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/openstack/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ func EnsureEndpointConfig(
Labels: util.MergeMaps(ed.Labels, map[string]string{serviceCertSelector: ""}),
Usages: nil,
}

addSubjNames := util.GetStringListFromMap(svc.Annotations, tls.AdditionalSubjectNamesKey)
if len(addSubjNames) > 0 {
certRequest.Hostnames = append(certRequest.Hostnames, addSubjNames...)
}
if instance.Spec.TLS.Ingress.Cert.Duration != nil {
certRequest.Duration = &instance.Spec.TLS.Ingress.Cert.Duration.Duration
}
Expand Down Expand Up @@ -343,6 +348,11 @@ func EnsureEndpointConfig(
Labels: util.MergeMaps(ed.Labels, map[string]string{serviceCertSelector: ""}),
Usages: nil,
}

addSubjNames := util.GetStringListFromMap(svc.Annotations, tls.AdditionalSubjectNamesKey)
if len(addSubjNames) > 0 {
certRequest.Hostnames = append(certRequest.Hostnames, addSubjNames...)
}
if instance.Spec.TLS.PodLevel.Internal.Cert.Duration != nil {
certRequest.Duration = &instance.Spec.TLS.PodLevel.Internal.Cert.Duration.Duration
}
Expand Down

0 comments on commit 6fe60e7

Please sign in to comment.