diff --git a/internal/openstack/barbican.go b/internal/openstack/barbican.go index db65d9cbb4..17aaa88b05 100644 --- a/internal/openstack/barbican.go +++ b/internal/openstack/barbican.go @@ -65,7 +65,7 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr } // Application Credential Management (Day-2 operation) - barbicanReady := barbican.Status.ObservedGeneration == barbican.Generation && barbican.IsReady() + barbicanReady := barbican.Status.Conditions != nil && barbican.Status.ObservedGeneration == barbican.Generation && barbican.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC barbicanSecret := instance.Spec.Barbican.Template.Secret diff --git a/internal/openstack/cinder.go b/internal/openstack/cinder.go index c36d6f8eb2..e68c58ce44 100644 --- a/internal/openstack/cinder.go +++ b/internal/openstack/cinder.go @@ -88,7 +88,7 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl } // Application Credential Management (Day-2 operation) - cinderReady := cinder.Status.ObservedGeneration == cinder.Generation && cinder.IsReady() + cinderReady := cinder.Status.Conditions != nil && cinder.Status.ObservedGeneration == cinder.Generation && cinder.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC cinderSecret := instance.Spec.Cinder.Template.Secret diff --git a/internal/openstack/designate.go b/internal/openstack/designate.go index 1b20ed1bc6..eb10935db6 100644 --- a/internal/openstack/designate.go +++ b/internal/openstack/designate.go @@ -77,7 +77,7 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont } // Application Credential Management (Day-2 operation) - designateReady := designate.Status.ObservedGeneration == designate.Generation && designate.IsReady() + designateReady := designate.Status.Conditions != nil && designate.Status.ObservedGeneration == designate.Generation && designate.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC designateSecret := instance.Spec.Designate.Template.Secret diff --git a/internal/openstack/glance.go b/internal/openstack/glance.go index aa76888ba3..594f9a7226 100644 --- a/internal/openstack/glance.go +++ b/internal/openstack/glance.go @@ -111,7 +111,7 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl // Application Credential Management (Day-2 operation) // Check if AC should be enabled and manage it accordingly - glanceReady := glance.Status.ObservedGeneration == glance.Generation && glance.IsReady() + glanceReady := glance.Status.Conditions != nil && glance.Status.ObservedGeneration == glance.Generation && glance.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC glanceSecret := instance.Spec.Glance.Template.Secret diff --git a/internal/openstack/heat.go b/internal/openstack/heat.go index 5fe4896604..19c0cb7a1f 100644 --- a/internal/openstack/heat.go +++ b/internal/openstack/heat.go @@ -112,7 +112,7 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl instance.Spec.Heat.Template.HeatCfnAPI.TLS.CaBundleSecretName = instance.Status.TLS.CaBundleSecretName // Application Credential Management (Day-2 operation) - heatReady := heat.Status.ObservedGeneration == heat.Generation && heat.IsReady() + heatReady := heat.Status.Conditions != nil && heat.Status.ObservedGeneration == heat.Generation && heat.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC heatSecret := instance.Spec.Heat.Template.Secret diff --git a/internal/openstack/ironic.go b/internal/openstack/ironic.go index 81b4fca5d8..2f76e9e8b2 100644 --- a/internal/openstack/ironic.go +++ b/internal/openstack/ironic.go @@ -115,7 +115,7 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl // Application Credential Management (Day-2 operation) // Ironic has 2 users: ironic (main service) and ironic-inspector - ironicReady := ironic.Status.ObservedGeneration == ironic.Generation && ironic.IsReady() + ironicReady := ironic.Status.Conditions != nil && ironic.Status.ObservedGeneration == ironic.Generation && ironic.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC // Both ironic and ironic-inspector share the same secret diff --git a/internal/openstack/manila.go b/internal/openstack/manila.go index 12c6f095b6..8c176b7477 100644 --- a/internal/openstack/manila.go +++ b/internal/openstack/manila.go @@ -67,7 +67,7 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl } // Application Credential Management (Day-2 operation) - manilaReady := manila.Status.ObservedGeneration == manila.Generation && manila.IsReady() + manilaReady := manila.Status.Conditions != nil && manila.Status.ObservedGeneration == manila.Generation && manila.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC manilaSecret := instance.Spec.Manila.Template.Secret diff --git a/internal/openstack/neutron.go b/internal/openstack/neutron.go index ce70ac5e74..f36cca3a4b 100644 --- a/internal/openstack/neutron.go +++ b/internal/openstack/neutron.go @@ -111,7 +111,7 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro instance.Spec.Neutron.Template.TLS.CaBundleSecretName = instance.Status.TLS.CaBundleSecretName // Application Credential Management (Day-2 operation) - neutronReady := neutronAPI.Status.ObservedGeneration == neutronAPI.Generation && neutronAPI.IsReady() + neutronReady := neutronAPI.Status.Conditions != nil && neutronAPI.Status.ObservedGeneration == neutronAPI.Generation && neutronAPI.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC neutronSecret := instance.Spec.Neutron.Template.Secret diff --git a/internal/openstack/nova.go b/internal/openstack/nova.go index 2f1ecb3a25..aa27677a8e 100644 --- a/internal/openstack/nova.go +++ b/internal/openstack/nova.go @@ -183,7 +183,7 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl } // Application Credential Management (Day-2 operation) - novaReady := nova.Status.ObservedGeneration == nova.Generation && nova.IsReady() + novaReady := nova.Status.Conditions != nil && nova.Status.ObservedGeneration == nova.Generation && nova.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC novaSecret := instance.Spec.Nova.Template.Secret diff --git a/internal/openstack/octavia.go b/internal/openstack/octavia.go index 69da107640..5765b01528 100644 --- a/internal/openstack/octavia.go +++ b/internal/openstack/octavia.go @@ -159,7 +159,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro } // Application Credential Management (Day-2 operation) - octaviaReady := octavia.Status.ObservedGeneration == octavia.Generation && octavia.IsReady() + octaviaReady := octavia.Status.Conditions != nil && octavia.Status.ObservedGeneration == octavia.Generation && octavia.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC octaviaSecret := instance.Spec.Octavia.Template.Secret diff --git a/internal/openstack/placement.go b/internal/openstack/placement.go index 960eeb4bde..3658b1263a 100644 --- a/internal/openstack/placement.go +++ b/internal/openstack/placement.go @@ -71,7 +71,7 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC } // Application Credential Management (Day-2 operation) - placementReady := placementAPI.Status.ObservedGeneration == placementAPI.Generation && placementAPI.IsReady() + placementReady := placementAPI.Status.Conditions != nil && placementAPI.Status.ObservedGeneration == placementAPI.Generation && placementAPI.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC placementSecret := instance.Spec.Placement.Template.Secret diff --git a/internal/openstack/swift.go b/internal/openstack/swift.go index bb4c68d3a0..54c7186147 100644 --- a/internal/openstack/swift.go +++ b/internal/openstack/swift.go @@ -101,7 +101,7 @@ func ReconcileSwift(ctx context.Context, instance *corev1beta1.OpenStackControlP } // Application Credential Management (Day-2 operation) - swiftReady := swift.Status.ObservedGeneration == swift.GetGeneration() && swift.IsReady() + swiftReady := swift.Status.Conditions != nil && swift.Status.ObservedGeneration == swift.GetGeneration() && swift.IsReady() // Apply same fallback logic as in CreateOrPatch to avoid passing empty values to AC swiftSecret := instance.Spec.Swift.Template.SwiftProxy.Secret diff --git a/internal/openstack/telemetry.go b/internal/openstack/telemetry.go index 354d669b61..c2009bc8c3 100644 --- a/internal/openstack/telemetry.go +++ b/internal/openstack/telemetry.go @@ -123,7 +123,7 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont // Application Credential Management (Day-2 operation) // Telemetry has 3 separate services with 3 different users: aodh, ceilometer, cloudkitty - telemetryReady := telemetry.Status.ObservedGeneration == telemetry.Generation && telemetry.IsReady() + telemetryReady := telemetry.Status.Conditions != nil && telemetry.Status.ObservedGeneration == telemetry.Generation && telemetry.IsReady() // AC for Aodh (if service enabled) if instance.Spec.Telemetry.Template.Autoscaling.Enabled != nil && *instance.Spec.Telemetry.Template.Autoscaling.Enabled { diff --git a/internal/openstack/watcher.go b/internal/openstack/watcher.go index 8ffc7bc835..daf7162321 100644 --- a/internal/openstack/watcher.go +++ b/internal/openstack/watcher.go @@ -65,7 +65,7 @@ func ReconcileWatcher(ctx context.Context, instance *corev1beta1.OpenStackContro // Application Credential Management (Day-2 operation) // Watcher uses pointer fields, safely extract values - watcherReady := watcher.Status.ObservedGeneration == watcher.Generation && watcher.IsReady() + watcherReady := watcher.Status.Conditions != nil && watcher.Status.ObservedGeneration == watcher.Generation && watcher.IsReady() // Helper to get Watcher values (which are pointers) with fallback logic getWatcherSecret := func() string {