Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: Neaj Morshad <[email protected]>
  • Loading branch information
Neaj-Morshad-101 committed May 31, 2024
1 parent fe8b607 commit 78ad8b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis/kubedb/v1alpha2/mssqlserver_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ func (m *MSSQLServer) SetTLSDefaultsForInternalAuth() {
// Endpoint-cert
defaultServerOrg := []string{KubeDBOrganization}
defaultServerOrgUnit := []string{string(MSSQLServerEndpointCert)}
_, cert := kmapi.GetCertificate(m.Spec.TLS.Certificates, string(MSSQLServerEndpointCert))
_, cert := kmapi.GetCertificate(m.Spec.InternalAuth.EndpointCert.Certificates, string(MSSQLServerEndpointCert))
if cert != nil && cert.Subject != nil {
if cert.Subject.Organizations != nil {
defaultServerOrg = cert.Subject.Organizations
Expand All @@ -507,7 +507,7 @@ func (m *MSSQLServer) SetTLSDefaultsForInternalAuth() {
}
}

m.Spec.TLS.Certificates = kmapi.SetMissingSpecForCertificate(m.Spec.TLS.Certificates, kmapi.CertificateSpec{
m.Spec.InternalAuth.EndpointCert.Certificates = kmapi.SetMissingSpecForCertificate(m.Spec.InternalAuth.EndpointCert.Certificates, kmapi.CertificateSpec{
Alias: string(MSSQLServerEndpointCert),
SecretName: m.GetCertSecretName(MSSQLServerEndpointCert),
Subject: &kmapi.X509Subject{
Expand Down

0 comments on commit 78ad8b8

Please sign in to comment.