Skip to content

Commit e6859a7

Browse files
committed
Fix Octavia ApplicationCredentialSecret set on wrong spec path
The ApplicationCredentialSecret was being set on OctaviaAPI.Auth (sub-spec level) instead of Auth (top-level OctaviaSpecBase). The octavia-operator reads the secret from spec.auth, which is populated from OctaviaSpecBase via DeepCopyInto, not from the OctaviaAPI sub-spec. This caused Octavia to silently fall back to password auth when ZDPR (application credentials) was enabled, because the secret name never reached the Octavia CR's spec.auth field. Verified manually by patching the controlplane CR to set spec.octavia.template.auth.applicationCredentialSecret, which confirmed Octavia correctly switches to v3applicationcredential auth_type when the secret is at the correct spec level. Co-authored-by: AI Assistant (Cursor/Claude) JIRA: OSPRH-26817
1 parent fd6da28 commit e6859a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎internal/openstack/octavia.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro
169169

170170
// Only call if AC enabled or currently configured
171171
if isACEnabled(instance.Spec.ApplicationCredential, instance.Spec.Octavia.ApplicationCredential) ||
172-
instance.Spec.Octavia.Template.OctaviaAPI.Auth.ApplicationCredentialSecret != "" {
172+
instance.Spec.Octavia.Template.Auth.ApplicationCredentialSecret != "" {
173173

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

200200
svcs, err := service.GetServicesListWithLabel(

0 commit comments

Comments
 (0)