From 6e0edb3a167b6dff96ceb675700fd7219ec2b084 Mon Sep 17 00:00:00 2001 From: Brent Eagles Date: Thu, 5 Dec 2024 13:30:38 +0000 Subject: [PATCH] Provide DatabaseInstance for Octavia if not explicitly set Several of the operator integrations include a conditional to set a hardcoded-yet-consistent default DatabaseInstance value if it is not explicitly set for the component operator. This block was missing from the Octavia integration. Jira: OSPRH-12243 --- pkg/openstack/octavia.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/openstack/octavia.go b/pkg/openstack/octavia.go index 8a59cff54..bdf62fb7e 100644 --- a/pkg/openstack/octavia.go +++ b/pkg/openstack/octavia.go @@ -183,6 +183,11 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro octavia.Spec.Secret = instance.Spec.Secret } + if octavia.Spec.DatabaseInstance == "" { + // octavia.Spec.DatabaseInstance = instance.Name // name of MariaDB we create here + octavia.Spec.DatabaseInstance = "openstack" // FIXME: see above + } + err := controllerutil.SetControllerReference(helper.GetBeforeObject(), octavia, helper.GetScheme()) if err != nil { return err