Skip to content

Commit

Permalink
Provide DatabaseInstance for Octavia if not explicitly set
Browse files Browse the repository at this point in the history
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
  • Loading branch information
beagles committed Dec 5, 2024
1 parent 4dd3ceb commit 6e0edb3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/openstack/octavia.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e0edb3

Please sign in to comment.