Skip to content

Commit

Permalink
[tls] add subject to rabbitmq cert
Browse files Browse the repository at this point in the history
  • Loading branch information
stuggi committed May 15, 2024
1 parent 706510e commit 029f7b8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/openstack/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"strings"

certmgrv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
networkv1 "github.com/openstack-k8s-operators/infra-operator/apis/network/v1beta1"
"github.com/openstack-k8s-operators/lib-common/modules/certmanager"
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
Expand Down Expand Up @@ -204,6 +205,15 @@ func reconcileRabbitMQ(
hostname,
fmt.Sprintf("%s.%s", hostname, ClusterInternalDomain),
},
Subject: &certmgrv1.X509Subject{
Organizations: []string{fmt.Sprintf("%s.cluster.local", rabbitmq.Namespace)},
},
Usages: []certmgrv1.KeyUsage{
"key encipherment",
"digital signature",
"server auth",
"client auth",
},
}
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 029f7b8

Please sign in to comment.