Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/openstack/octavia.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro

// Only call if AC enabled or currently configured
if isACEnabled(instance.Spec.ApplicationCredential, instance.Spec.Octavia.ApplicationCredential) ||
instance.Spec.Octavia.Template.OctaviaAPI.Auth.ApplicationCredentialSecret != "" {
instance.Spec.Octavia.Template.Auth.ApplicationCredentialSecret != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should first fix octavia-operator - right now octavia has incorectly Auth type and nested ApplicationCredentialSecret in OctaviaAPI and at the same time Auth type in OctaviaSpecBase, but the Auth and nested ApplicationCredentialSecret should be in the parent octavia_types.go file.

https://github.com/openstack-k8s-operators/octavia-operator/blob/main/api/v1beta1/octavia_types.go#L248 (this one is correct, we just need to add the ApplicatioCredentialSecret and delete them from OctaviaAPI)

@millevy agreed to take care of this.


acSecretName, acResult, err := EnsureApplicationCredentialForService(
ctx,
Expand All @@ -194,7 +194,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro
// Set ApplicationCredentialSecret based on what the helper returned:
// - If AC disabled: returns ""
// - If AC enabled and ready: returns the AC secret name
instance.Spec.Octavia.Template.OctaviaAPI.Auth.ApplicationCredentialSecret = acSecretName
instance.Spec.Octavia.Template.Auth.ApplicationCredentialSecret = acSecretName
}

svcs, err := service.GetServicesListWithLabel(
Expand Down