Skip to content

Commit 135f6c5

Browse files
committed
[ovndbs] For cert setup do not wait for dbs to be ready
Currently when TLS is enabled OVNDBClusters are created first without Certs, wait for those to be ready, create certs and update ovndbclusters with tls enabled. This causes issues as with this even with TLS enabled OVN raft is setup with local-address as non-ssl and later scale up do not work due to this. To fix this changing the conditions to create certs when TLS is enabled like other services. Related-Issue: OSPRH-6899
1 parent d2703d3 commit 135f6c5

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎pkg/openstack/ovn.go‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func ReconcileOVNDbClusters(ctx context.Context, instance *corev1beta1.OpenStack
9696
}
9797
dbcluster.TLS.CaBundleSecretName = instance.Status.TLS.CaBundleSecretName
9898

99-
if OVNDBCluster.Status.Conditions.IsTrue(condition.ExposeServiceReadyCondition) {
99+
if instance.Spec.TLS.PodLevel.Enabled {
100100
// create certificate for ovndbclusters
101101
certRequest := certmanager.CertificateRequest{
102102
IssuerName: instance.GetOvnIssuer(),
@@ -131,9 +131,7 @@ func ReconcileOVNDbClusters(ctx context.Context, instance *corev1beta1.OpenStack
131131
return false, nil
132132
}
133133

134-
if instance.Spec.TLS.PodLevel.Enabled {
135-
dbcluster.TLS.SecretName = &certSecret.Name
136-
}
134+
dbcluster.TLS.SecretName = &certSecret.Name
137135
}
138136

139137
Log.Info("Reconciling OVNDBCluster", "OVNDBCluster.Namespace", instance.Namespace, "OVNDBCluster.Name", name)

0 commit comments

Comments
 (0)