@@ -881,11 +881,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
881881 if r .Spec .Cinder .Template .MessagingBus .Cluster == "" {
882882 r .Spec .Cinder .Template .MessagingBus .Cluster = "rabbitmq"
883883 }
884- // Propagate top-level NotificationsBus to template if not already set
885- // This prevents the service operator's Default() from using the deprecated field
886- if r .Spec .Cinder .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
887- r .Spec .Cinder .Template .NotificationsBus = r .Spec .NotificationsBus
888- }
884+ // NotificationsBus propagation is handled in the reconcile loop to properly support
885+ // both inheritance and clearing. The webhook doesn't have access to the old object
886+ // to distinguish between user overrides and inherited values.
889887 r .Spec .Cinder .Template .Default ()
890888 initializeOverrideSpec (& r .Spec .Cinder .APIOverride .Route , true )
891889 r .Spec .Cinder .Template .SetDefaultRouteAnnotations (r .Spec .Cinder .APIOverride .Route .Annotations )
@@ -915,11 +913,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
915913 if r .Spec .Glance .Template == nil {
916914 r .Spec .Glance .Template = & glancev1.GlanceSpecCore {}
917915 }
918- // Propagate top-level NotificationsBus to template if not already set
919- // This prevents the service operator's Default() from using the deprecated field
920- if r .Spec .Glance .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
921- r .Spec .Glance .Template .NotificationsBus = r .Spec .NotificationsBus
922- }
916+ // NotificationsBus propagation is handled in the reconcile loop to properly support
917+ // both inheritance and clearing. The webhook doesn't have access to the old object
918+ // to distinguish between user overrides and inherited values.
923919 r .Spec .Glance .Template .Default ()
924920 // initialize the main APIOverride struct
925921 if r .Spec .Glance .APIOverride == nil {
@@ -984,11 +980,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
984980 if r .Spec .Keystone .Template == nil {
985981 r .Spec .Keystone .Template = & keystonev1.KeystoneAPISpecCore {}
986982 }
987- // Propagate top-level NotificationsBus to template if not already set
988- // This prevents the service operator's Default() from using the deprecated field
989- if r .Spec .Keystone .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
990- r .Spec .Keystone .Template .NotificationsBus = r .Spec .NotificationsBus
991- }
983+ // NotificationsBus propagation is handled in the reconcile loop to properly support
984+ // both inheritance and clearing. The webhook doesn't have access to the old object
985+ // to distinguish between user overrides and inherited values.
992986 r .Spec .Keystone .Template .Default ()
993987 initializeOverrideSpec (& r .Spec .Keystone .APIOverride .Route , true )
994988 r .Spec .Keystone .Template .SetDefaultRouteAnnotations (r .Spec .Keystone .APIOverride .Route .Annotations )
@@ -1003,11 +997,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
1003997 if r .Spec .Manila .Template .MessagingBus .Cluster == "" {
1004998 r .Spec .Manila .Template .MessagingBus .Cluster = "rabbitmq"
1005999 }
1006- // Propagate top-level NotificationsBus to template if not already set
1007- // This prevents the service operator's Default() from using the deprecated field
1008- if r .Spec .Manila .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
1009- r .Spec .Manila .Template .NotificationsBus = r .Spec .NotificationsBus
1010- }
1000+ // NotificationsBus propagation is handled in the reconcile loop to properly support
1001+ // both inheritance and clearing. The webhook doesn't have access to the old object
1002+ // to distinguish between user overrides and inherited values.
10111003 r .Spec .Manila .Template .Default ()
10121004 initializeOverrideSpec (& r .Spec .Manila .APIOverride .Route , true )
10131005 r .Spec .Manila .Template .SetDefaultRouteAnnotations (r .Spec .Manila .APIOverride .Route .Annotations )
@@ -1035,11 +1027,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
10351027 if r .Spec .Neutron .Template .MessagingBus .Cluster == "" {
10361028 r .Spec .Neutron .Template .MessagingBus .Cluster = "rabbitmq"
10371029 }
1038- // Propagate top-level NotificationsBus to template if not already set
1039- // This prevents the service operator's Default() from using the deprecated field
1040- if r .Spec .Neutron .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
1041- r .Spec .Neutron .Template .NotificationsBus = r .Spec .NotificationsBus
1042- }
1030+ // NotificationsBus propagation is handled in the reconcile loop to properly support
1031+ // both inheritance and clearing. The webhook doesn't have access to the old object
1032+ // to distinguish between user overrides and inherited values.
10431033 r .Spec .Neutron .Template .Default ()
10441034 initializeOverrideSpec (& r .Spec .Neutron .APIOverride .Route , true )
10451035 r .Spec .Neutron .Template .SetDefaultRouteAnnotations (r .Spec .Neutron .APIOverride .Route .Annotations )
@@ -1055,11 +1045,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
10551045 if r .Spec .Nova .Template .MessagingBus .Cluster == "" {
10561046 r .Spec .Nova .Template .MessagingBus .Cluster = "rabbitmq"
10571047 }
1058- // Propagate top-level NotificationsBus to template if not already set
1059- // This prevents the service operator's Default() from using the deprecated field
1060- if r .Spec .Nova .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
1061- r .Spec .Nova .Template .NotificationsBus = r .Spec .NotificationsBus
1062- }
1048+ // NotificationsBus propagation is handled in the reconcile loop to properly support
1049+ // both inheritance and clearing. The webhook doesn't have access to the old object
1050+ // to distinguish between user overrides and inherited values.
10631051 r .Spec .Nova .Template .Default ()
10641052 initializeOverrideSpec (& r .Spec .Nova .APIOverride .Route , true )
10651053 r .Spec .Nova .Template .SetDefaultRouteAnnotations (r .Spec .Nova .APIOverride .Route .Annotations )
@@ -1211,11 +1199,9 @@ func (r *OpenStackControlPlane) DefaultServices() {
12111199 if r .Spec .Watcher .Template .MessagingBus .Cluster == "" {
12121200 r .Spec .Watcher .Template .MessagingBus .Cluster = "rabbitmq"
12131201 }
1214- // Propagate top-level NotificationsBus to template if not already set
1215- // This prevents the service operator's Default() from using the deprecated field
1216- if r .Spec .Watcher .Template .NotificationsBus == nil && r .Spec .NotificationsBus != nil {
1217- r .Spec .Watcher .Template .NotificationsBus = r .Spec .NotificationsBus
1218- }
1202+ // NotificationsBus propagation is handled in the reconcile loop to properly support
1203+ // both inheritance and clearing. The webhook doesn't have access to the old object
1204+ // to distinguish between user overrides and inherited values.
12191205 r .Spec .Watcher .Template .Default ()
12201206
12211207 if r .Spec .Watcher .Enabled {
0 commit comments